Cannot assign to read only property 'props' of #
I checked #1654 with no success. Please have a look at the issue in more detail here-
Basically what I am doing is using a Navigator to move from index page to ApplistGridView page. I see the navigation is successful(from logs) but, even before I see the screen I face this issue.
And chrome debug messages-
Code is posted at Github Haven't found a solution. What am I doing wrong?
You cannot push to props this.props.nav.push({id: 'Applist', index: 2});
since component properties are read-only, as the error states. Props can only be derived from a parent component, but cannot be modified.
EDIT: This article is a great starting point for people confused in this matter as I was a while ago:) https://reactjs.org/docs/thinking-in-react.html
If this is happening to you not because of props but because of state, you may be trying to do an assignment like this:
this.state.nav = 'whatever';
Remember that assignments to state
in React should be like:
this.setState({
nav: 'whatever'
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With