Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Enable window/body based scrolling for all ScrollViews #1472
I am always impressed by this project and today is finally the day to give a little bit back!
This PR is the first version of using the full page scrolling with React Native Web apps.
This has multiple restrictions, for example it blocks mobile browsers (both Chrome on Android and iOS) from hiding the navigation bars if the page is scrolled down, blocking a lot of the screen. Generally, this leads to the pages feeling less like proper websites.
My proposed solution allows for any ScrollView component to use a new prop
I added a
I am sure that there are more issues to tackle. For example I am unsure wether scroll positions should be normalized such that the position of the
The idea is to wrap the whole app in a
(Hacky tip for people who want to use nested Flatlists: use A Flatlist without data and put everything in the
I’m playing with
I'm facing some issues related to the fact that the web is designed to have the
Here are some of the issues I'm facing without this PR because of the previously stated problem:
I haven't looked into this PR code but I think the general idea of an
@MathieuUrstein Did you test the code of the PR or of the general React Native Web version. If you used Expo Snack you unfortunately cannot test this PR (as far as I know).
This PR tries to solve exactly that. It disables the default scroll behaviour of the
Did you use the exact Snack, because this neither uses my PR nor the
I think that designing for body scrolling will always have some caveats, but is generally an improvement. Body scrolling is not something that people would use who just want to put their mobile app on the web with whatever means but instead tailors to people who want to build a proper web app.
No I was demonstrating some issues we currently have with react-native-web that your PR can solve. My comment was targeted to prove that your PR is a great idea :)
P:S: I have edited my previous comment to clarify my point.