Using native components
Working with RN is very much like working with React—there are components, state, props, life cycle events, and so on—but there is a key difference: your own components won't be based on HTML, but on specific RN ones. For instance, you won't be using <div> elements, but rather <View> ones, which will be then mapped by RN to a UIView for iOS, or to an Android.View for Android. Views can be nested inside views, just as <div> tags can be. Views support layout and styling, they respond to touch events and more, so they are basically equivalent to <div> tags, leaving aside the mobile environment behaviors and specifics.
There are more differences: components also have different properties than the HTML ones, and you'll ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access