pass state to child react code example
Example: pass state to child react
class SomeParentComponent extends React.Component {
constructor(props) {
super(props);
this.state = {color: 'red'};
}
render() {
return ;
}
}
class SomeParentComponent extends React.Component {
constructor(props) {
super(props);
this.state = {color: 'red'};
}
render() {
return ;
}
}