Will this piece of code work?

Technology CommunityCategory: React NativeWill this piece of code work?
VietMX Staff asked 3 years ago
Problem
<View>
  <Text>Hey there!</Text>
  <Text style={{ fontsize: 40 }} >Example of inline style</Text>;
</View>

No. An error will be thrown as Text strings must be rendered within Text component. Because here semi-colon in third line will be treated as text, and in React native all texts needs to be rendered inside Text tag.