Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
109
rated 0 times [  110] [ 1]  / answers: 1 / hits: 118004  / 9 Years ago, tue, november 24, 2015, 12:00:00

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-



Screenshot



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-



Chrome



Code is posted at Github
Haven't found a solution.
What am I doing wrong?


More From » reactjs

 Answers
74

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


[#64286] Sunday, November 22, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dayshadelaniej

Total Points: 668
Total Questions: 121
Total Answers: 121

Location: Sao Tome and Principe
Member since Wed, Dec 21, 2022
1 Year ago
dayshadelaniej questions
;