You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to 0.9.0, I'm getting an error "Cannot add property "hideModal", object is not extensible." I also see the warning: Cannot update during an existing state transition (such as within render). Render methods should be a pure function of props and state.
I've been previously added some properties to the children props inside render:
render: function() {
var childrenWithModalProps = [].concat(this.props.children);
for (var i = 0; i < childrenWithModalProps.length; i++) {
childrenWithModalProps[i].props["hideModal"] = this.hideModal;
childrenWithModalProps[i].props["showModal"] = this.showModal;
}
...
I understand the problem is you're using preventExtensions or whatever to prevent extensions of props inside render. Where am I supposed to extend the props then? Is there a beforeRender or something I can use to accomplish this?
The text was updated successfully, but these errors were encountered:
After upgrading to 0.9.0, I'm getting an error "Cannot add property "hideModal", object is not extensible." I also see the warning: Cannot update during an existing state transition (such as within
render
). Render methods should be a pure function of props and state.I've been previously added some properties to the children props inside render:
I understand the problem is you're using preventExtensions or whatever to prevent extensions of props inside render. Where am I supposed to extend the props then? Is there a beforeRender or something I can use to accomplish this?
The text was updated successfully, but these errors were encountered: