react-svg-morph icon indicating copy to clipboard operation
react-svg-morph copied to clipboard

Breaks use of context

Open neverfox opened this issue 9 years ago • 1 comments

If you have elements that expect to get context (e.g. theming), this is broken by wrapping them in MorphReplace. For example, I tried to use this with two SvgIcons from material-ui (which relies on a context-based theming model) and their context ends up undefined. Is there a way to make MorphReplace etc. "invisible", by ensuring that context gets passed through to the children as if it wasn't there?

neverfox avatar Nov 28 '15 01:11 neverfox

I have tried to fix this but it's not that trivial, so not sure when will be able to tackle this again.

It's broken because I am not sure how to use existing context and pass to react-render-to-json

gorangajic avatar Dec 25 '15 15:12 gorangajic