"Warning: Legacy context API has been detected within a strict-mode tree."
miikakuisma opened this issue · comments
I guess we will have to switch to use React context, it's a bit a shame because the legacy API was quite convenient but here it will require gl-react to have 2 nested vdom (as a Node is both a context consumer and a context provider).
I'm afraid migrating to latest context API is really not an easy task for gl-react.
I hope it's not planned to be dropped yet..
nesting <Consumer>
& <Provider>
to inject the glParent/glSurface/glSizable is going to be super overkill, and even if we manage to get it working, i'm not sure how I can solve the fact gl-react deeply work with classes today and expect to use references of these to build up a "dependency graph" where we can then hook things to redraw bottom-to-top.
(was discussing it on https://twitter.com/greweb/status/1342776401011871745 too)
Hey @gre is there any path forward for this? disabling strict mode seems like the only solution so far, but at some point in time, gl-react will need to support the new context apis.