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

"Warning: Legacy context API has been detected within a strict-mode tree." #255

Open
miikakuisma opened this issue Jun 25, 2020 · 3 comments
Assignees

Comments

@miikakuisma
Copy link

bug report

I'm getting this in the console.

Screenshot 2020-06-25 at 19 32 15

library version

  • gl-react version 4.0.1
  • React version 16.12.0
@gre gre self-assigned this Dec 23, 2020
@gre
Copy link
Owner

gre commented Dec 23, 2020

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).

@gre
Copy link
Owner

gre commented Dec 26, 2020

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)

@Digized
Copy link

Digized commented Jul 3, 2023

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.

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

3 participants