-
Syntax of functions (declaration with function keyword vs arrow functions)
-
Passing props to direct children (one level)
-
Passing props down to grandchildren (multiple levels)
<NameOfComponent nameOfProp={name of value or function}/>
><Container handleClick={this.handleClick}/>
><Button handleClick={props.handleClick}/>
-
Import components from another file
import <name of component> from "<name of the file that contains the component>";
-
event
comes from the browseronClick={e => props.handleClick(e)}
e => props.handleClick(e)
is an anonymous function -
You can totally pass a function down as props
-
this.props
,this.functionName
, ... are only for class components; otherwise if you have a functional component, you would refer to your props as justprops