Most of the components can be customized when they are created with various parameters. These creation options are named -
Your own components can also use
props. This allows you to create a single component that will be used in many different places in your application, with slightly different properties in each place. To get their values, refer to
props.YOUR_PROP_NAME in your functional components or
this.props.YOUR_PROP_NAME in your class components.
Here's an example:
props allows us to customize the greeting component so that we can reuse that component for each of our greetings. This example also uses the JSX
HelloWorld component. The ability to do this is what makes React so awesome.
Thanks goes to these wonderful people (emoji key):