Closed cloud-walker closed 6 years ago
@cloud-walker so something weird happens when they're mounted together like that, but in a more likely scenario they play nicely together https://codesandbox.io/s/8kr8nnlpm2
If you'd like to submit a PR I'd be grateful
@cloud-walker could you checkout #28?
Oh, sorry mate, never mind. Just saw https://github.com/cloud-walker/react-web-scrolllock
I was experimenting, I've realized that there is not perfect solution to the problem, I'm blocked right now, and for now I use a custom implementation inside the company code.
BTW I'm happy to help to find a better solution 👍
If you render 2 or more ScrollLock components, you end up with a permanently locked body, even unmounting them.
Here a codesandbox example: https://codesandbox.io/s/q2l94npn9