React Native component Text - difference from p tag

 <Text>

React Native component 'Text' act the same as paragraph tags in HTML. You cannot write text outside the Text component in React Native. So this is one of the important components of React Native.



There are also some differences between 'Text' component in react native and 'p' in HTML. Some of them are below:-

1. Major difference between the Text component in react native and the p tag in HTML is their use case. Text component is used to render text in the app which may be a header, paragraph but <p> tag is mainly used to create a paragraph.

2. There may not alternative to the Text component in React Native while you can simply put paragraphs in some more tags in HTML.


There may be some other differences between Text and p tag like styling methods etc. But in some way they may act similar.


Comments