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

RadioSVGMap broken in React 17 #53

Open
tgeorgiadis opened this issue May 13, 2021 · 5 comments
Open

RadioSVGMap broken in React 17 #53

tgeorgiadis opened this issue May 13, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@tgeorgiadis
Copy link

It appears RadioSVGMap is broken in React 17

I've made a Code Sandbox showing the error:
https://codesandbox.io/s/reverent-goodall-5ox98?file=/src/App.js

Error:
Minified React error #188; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=188 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Full text of error: Unable to find node on an unmounted component.

@VictorCazanave VictorCazanave added the bug Something isn't working label May 15, 2021
@VictorCazanave
Copy link
Owner

Thank you for reporting this issue @tgeorgiadis

I don't know when I have time to look at it, because currently I'm very busy. If you know how to fix it, feel free to open a PR!
Btw I think your Code Sandbox is just an empty react application 🤔

@BossBele
Copy link

+1 on this

@thomb
Copy link

thomb commented Jun 18, 2021

FWIW this same issue occurs with <CheckboxSVGMap />, that said as a workaround if you use the vanilla <SVGMap /> and manage state outside of this library you can generally get the same/similar behaviour of <CheckboxSVGMap /> and <RadioSVGMap />

@RamonDonnell RamonDonnell mentioned this issue Jul 3, 2021
7 tasks
@VictorCazanave
Copy link
Owner

VictorCazanave commented Jul 4, 2021

CheckboxSVGMap seems to work with React 17: https://codesandbox.io/s/checkbox-svg-map-with-react-17-wx0pz

@VictorCazanave
Copy link
Owner

Although I couldn't fix it in a Code Sandbox, RadioSVGMap worked in a local project with React 17.0.2.

However, in strict mode, it throws a warning, because the deprecated ReactDOM.findDOMNode() in still used in RadioSVGMap and couldn't be replaced by ref since it's not supported on functional components in React 16.0.0.

@tgeorgiadis @BossBele if you got the error in a local project, could you provide a repository to reproduce it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants