FormidableLabs / component-playground

A component for rendering React components with editable source and live preview
MIT License
1.19k stars 117 forks source link

passed context into inner root node and passed context via apply #73

Open GTDev87 opened 8 years ago

GTDev87 commented 8 years ago

This allows react-router to pass router context into inner mounting node. JSON.stringifygot rid of the functions on the router context.

Thanks!

ryanswanson commented 6 years ago

Ran into a similar issue using examples with emotion and emotion-theming in which the theme's read-only store (object with subscribe/unsubscribe) is passed from the theme provider to emotion components via React context.

A quick patch of the changes to preview.jsx made our use cases with emotion work, so we'll likely fork until this fix makes it to master.