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

Child context is not passed down #1634

Closed
madebyherzblut opened this issue Jun 1, 2014 · 2 comments
Closed

Child context is not passed down #1634

madebyherzblut opened this issue Jun 1, 2014 · 2 comments

Comments

@madebyherzblut
Copy link

In my application I have an AppComponent which renders a module component (e.g. DashboardComponent) dynamically (according to its props). Unfortunately, the context is not passed down in this case.

Test Case: http://jsfiddle.net/madebyherzblut/eAGyj/

If I hard-code the module component it works perfectly. Do I need to pass it manually?

@sophiebits
Copy link
Collaborator

This is intentional; context is determined by where a component is created (in your mount() function), not where it is rendered (in your App component). Also note that context is experimental and likely to change in future versions.

@madebyherzblut
Copy link
Author

In case anyone else runs into the same problem: This is a (hackish) way to solve the problem for now: http://jsfiddle.net/madebyherzblut/eAGyj/6/. The module component is created inside the AppComponent to have access to the right context.

But as @spicyj said, the feature is likely to change.

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

No branches or pull requests

2 participants