jeremybarbet / react-native-portalize

The simplest way to render anything on top of the rest.
MIT License
335 stars 22 forks source link

Children not properly cleaned on unmount #3

Closed mavarazy closed 4 years ago

mavarazy commented 4 years ago

This is caused by an error in Consumer - key is undefined inside the useEffect. Solution would be to useRef instead of useState.

Here is a video with more details

https://www.loom.com/share/3152178816fe4c58a17962128dd4e18a

jeremybarbet commented 4 years ago

Cf https://github.com/jeremybarbet/react-native-portalize/pull/4

Released in 1.0.4