From a160a99eb228d7c36a3dc6d776357eadb4facba9 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Sat, 5 Mar 2016 21:55:51 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/text.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/next/docs/text.html b/releases/next/docs/text.html index 5d6ff200421..37585ffa6f2 100644 --- a/releases/next/docs/text.html +++ b/releases/next/docs/text.html @@ -56,7 +56,7 @@ html { font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 11px; color: #141823; -}

When the browser is trying to render a text node, it's going to go all the way up to the root element of the tree and find an element with a font-size attribute. An unexpected property of this system is that any node can have font-size attribute, including a <div>. This was designed for convenience, even though not really semantically correct.

In React Native, we are more strict about it: you must wrap all the text nodes inside of a <Text> component; you cannot have a text node directly under a <View>.

// BAD: will fatal, can't have a text node as child of a <View> +}

When the browser is trying to render a text node, it's going to go all the way up to the root element of the tree and find an element with a font-size attribute. An unexpected property of this system is that any node can have font-size attribute, including a <div>. This was designed for convenience, even though not really semantically correct.

In React Native, we are more strict about it: you must wrap all the text nodes inside of a <Text> component; you cannot have a text node directly under a <View>.

// BAD: will raise exception, can't have a text node as child of a <View> <View> Some text </View>