Farzin-Firoozi / react-modern-drawer

https://farzin-firoozi.github.io/react-modern-drawer/
MIT License
216 stars 24 forks source link

Content of the drawer is hydrated, even if the drawer is closed, #12

Closed rasujan closed 2 years ago

rasujan commented 2 years ago

The content of the drawer is created on the DOM even when the drawer is closed. Which cases issue if we use useEffect hook on the drawer component itself. I also load the unnecessary components in the DOM.

As for my current workflow, I check the isOpen prop before rendering the components in the wrapper.

Farzin-Firoozi commented 2 years ago

This is actually not an issue because it should exists there in order to open the drawer with animation.

you can do one of the following actions:

If you have any ideas about how to get it fixed feel free to open a PR for that. :)

Farzin-Firoozi commented 2 years ago

Closing due to no activity,