ReactJS - Properties (props)

React enables developers to create dynamic and advanced component using properties. Every component can have attributes similar to HTML attributes and each attribute’s value can be accessed inside the component using properties (props).

For example, Hello component with a name attribute can be accessed inside the component through this.props.name variable.

<Hello name="React" />
// value of name will be "Hello* const name = this.props.name

React properties supports attribute’s value of different types. They are as follows,

Let us learn one by one in this chapter.


Revision #1
Created 14 December 2022 10:41:07 by Admin
Updated 14 December 2022 10:41:50 by Admin