Well done! You’ve covered some of React Native’s most common core components. Let’s review:
Viewcomponent can be used to create responsive layouts using flexbox, or add basic styling to nested components.
Textcomponent displays text. On Android and iOS, all text strings needs to be wrapped in one of these.
Imagecomponent displays images. They can be referenced using an
file://reference, Base64-encoded string, or image imported as module with
ScrollViewcomponent is a “visible” container with the scrolling functionality added. In most places, you wouldn’t need scrolling.
Buttoncomponent is used for “click” or “press” interactions.
TextInputcomponent is used for capturing user input.
- Components can be combined into custom components for consistent style and reusability.
The previous exercise’s code is provided here if you’d like to experiment with core components!