replaceProps

replaceProps

void replaceProps(
  object nextProps,
  [function callback]
)

Like setProps() but deletes any pre-existing props instead of merging the two objects.

This method is deprecated and will be removed soon. This method is not available on ES6 class components that extend React.Component. Instead of calling replaceProps, try invoking ReactDOM.render() again with the new props. For additional notes, see our blog post about using the Top Level API

doc_React
2016-06-23 03:32:25
Comments
Leave a Comment

Please login to continue.