0

How do we pass/set the entire parent state into/as the child state using props? Does the below example work?

class ChildComponent extends React.Component {

  state = {...this.props.state}
  ...

Thank you,

Anonymous Asked question May 13, 2021