Closed
Description
I've created a repo which shows the odd behaviour: https://github.com/chrisdew/react-quickstart
The problem is that if I click either the link or the button to go to /nesting/users/doe
, the NestedUserPage::render
is run before (and after) NestedUserPage::getInitialStateAsync
.
NestedUserPage::render client.js:125
NestedUserPage::getInitialState client.js:109
NestedUserPage::render client.js:125
In my own code, where it uses Array::map to render lists, this premature rendering produces Uncaught TypeError: Cannot read property 'map' of undefined
and stops the site from working.
The un-nested /users/doe
works fine, as UserPage::getInitialStateAsync
is called before the first UserPage::render
.
UserPage::getInitialState client.js:56
UserPage::render
This may be a bug, or a problem with my understanding.
Metadata
Metadata
Assignees
Labels
No labels