question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

about Parent vs. Owner Context in 0.14

See original GitHub issue

Sorry to bring this up again, but 0.14 will cause a lot of changes through out our codebase.

I notice context has switched to parent-based context in 0.14 beta, but a lot of libraries(especially react-router) depends on context, in a lot of our components we usually render children into body instead of inside current component, such as:

https://jsfiddle.net/yiminghe/zrj6fqjj/2/

And in 0.14 beta we will not get context, so router breaks, I wonder is there a syntax to get inherited context and render element with it, for example

React.render(el,container,{
context: this.inheritedContext
})

or maybe I should file issue directly to react-router?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sophiebitscommented, Sep 9, 2015
ReactDOM.unstable_renderSubtreeIntoContainer(this, el, container);

should work.

0reactions
sophiebitscommented, Sep 9, 2015

Right now it passes context, that’s all. Unclear if it’ll be expanded to include anything else in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parent vs. Owner Context - gists · GitHub
In many cases, the owner and the parent are the same node, in which case, no further action is necessary. However, if your...
Read more >
The land of undocument react.js: The Context - Dmitry Kudryavtsev
Context is an undocumented feature of react.js and it is similar in a way to props, but the only difference is that props...
Read more >
дэн on Twitter: "@hugobessaa This is basically what 0.14 parent ...
Lift simple (non-subscription) state out of the components, colocate state transforms, use propTypes. Too naïve? ... @hugobessaa This is basically what 0.14 ......
Read more >
Who Is the Rightful Owner? Young Children's Ownership ...
This study aimed to examine whether Chinese preschoolers understand that ownership can be transferred in different contexts.
Read more >
Parental Pre-knowledge Enhances Guidance During Inquiry ...
How parents and children inquire and what they can learn through inquiry in the museum context is of interest for developmental and educational ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found