Temzasse / react-modal-sheet

Flexible bottom sheet component built with Framer Motion to provide buttery smooth UX while keeping accessibility in mind 🪐
https://temzasse.github.io/react-modal-sheet/
MIT License
791 stars 75 forks source link

SSR Support for Sheet.Content #21

Closed MarkusWendorf closed 3 years ago

MarkusWendorf commented 3 years ago

Hi there,

would it be possible to output the Sheet.Content to the html on the server-side? Currently it is not possible because createPortal references part of the document (not available on the server), right?.

If the user could decide how/where to mount the Sheet this would be possible right? i.e. opting out of the createPortal logic and putting it somewhere else in the regular React tree.

Temzasse commented 3 years ago

Fixed in https://github.com/Temzasse/react-modal-sheet/pull/33