shirakaba / react-nativescript

React renderer for NativeScript
https://react-nativescript.netlify.com
MIT License
280 stars 14 forks source link

Check whether creating a React Portal into a null container is safe on unmount and doesn't leak memory #25

Closed shirakaba closed 5 years ago

shirakaba commented 5 years ago

We'll be using this trick a lot, as it's the only way to navigate.

May require special handling in the Host Config (e.g. to ensure that null.removeChild() is never called on Portal unmount). May also need to learn how properly to handle unmounting such a portal.

shirakaba commented 5 years ago

Now that I understand a bit more about detached trees, I believe that this won't be a problem in practice.