- React Native Tutorial
- Core Concepts
- React.Component render componentDidMount props/state dangerouslySetInnerHTML React is a JavaScript library for building user interfaces. This guide targets React v15 to v16.
- React Native Styling Cheat Sheet Contents General Components Flexbox Shadow Prop Types IOS Transforms Image ScrollView Text TextInput View Appendix Types number string bool oneOf arrayOf README.md React Native Styling Cheat Sheet.
- Components and APIs
Hey, React Native! I’d find out why barcode implementation isn’t stable. But for now, let me try Flutter. Let’s see how it goes. Sometime last year, I read a few materials on Flutter, but due to the fact that I had no project to work with, I wasn’t consistent with it. This is a chance to dive deeper into Flutter.
- React Native Useful Resources
- Selected Reading
There are a couple of ways to style your elements in React Native.
You can use the style property to add the styles inline. However, this is not the best practice because it can be hard to read the code.
In this chapter, we will use the Stylesheet for styling.
Container Component
In this section, we will simplify our container component from our previous chapter.
App.js
Presentational Component
React Native Cheat Sheet Pdf
In the following example, we will import the StyleSheet. At the bottom of the file, we will create our stylesheet and assign it to the styles constant. Note that our styles are in camelCase and we do not use px or % for styling.
To apply styles to our text, we need to add style = {styles.myText} property to the Text element.
PresentationalComponent.js
React Native Cheat Sheet
When we run the app, we will receive the following output.