React Native PropsThe properties of React Native components are simply pronounced as props. In React Native, most of the components can be customized at the time of their creation with different parameters. These parameters are known as props. They are immutable, and they cannot be changed. One of the examples of props is a source property if Image component which controls the image is displayed over the device screen. React Native Default custom PropsOutput: Using props in our own ComponentWe can also use props in our components. A single component can be used in many different places in the app by making slightly different properties in each place. To implement the props in our component, this.props is applied followed by the property. For example, one of the basic React Native components is Text. When we create a Text component, we can use a prop "name" as props to control its appearance. We also apply the StyleSheet to the component which is used as our component. App.js Output:
Next TopicReact Native Style
|