Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example using createElement to call static populateStore #8

Open
wants to merge 1 commit into
base: routed-email-app
Choose a base branch
from

Conversation

naw
Copy link
Owner

@naw naw commented Dec 6, 2015

This PR illustrates using createElement in react-router to call static populateStore functions for each route branch component.

Note createElement is called for every "layer" of the route branch every time the route changes, whereas onEnter is only called for the new pieces of the route.

In other words if you have App/Folders/:id/Email:emailId/, and change from 1 email to another, onEnter is called only for the Email component, whereas createElement is called for App, Folders, and Email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants