React Native error: Raw “ ” must be wrapped in an explicit <Text> Component

来源:互联网 发布:centos 6 ssh拒绝访问 编辑:程序博客网 时间:2024/06/09 19:42

之所以 出现 这样错误 应为 React 把标签 与标签直接的空格 认为了是字符 让你 用Text


以下两种是正确的书写规范

RawText " " must be wrapped in an explicit <Text> component.
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:17438:14
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
mountChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19820:56
initializeChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19279:41
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19339:28
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
mountChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19820:56
initializeChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19279:41
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19339:28
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
mountChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19820:56
initializeChildren
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19279:41
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:19339:28
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
performInitialMount
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20463:48
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:20367:40
mountComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16635:49
mountComponentIntoNode
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:21606:46
perform
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16921:24
batchedMountComponentIntoNode
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:21613:22
perform
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16921:24
batchedUpdates
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16446:33
batchedUpdates
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:16515:41
renderComponent
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:21658:32
render
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:7486:42
renderApplication
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:46767:21
run
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:46555:33
runApplication
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:46595:26
__callFunction
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:5057:47
<unknown>
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:4928:29
guard
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:4892:7
callFunctionReturnFlushedQueue
    index.android.bundle?platform=android&dev=true&hot=false&minify=false:4927:12

0 0