Change pages by swiping in React - reactjs

Is there a way to swipe between pages in react?
Something like: https://www.npmjs.com/package/react-page-transitions but using swipe as a trigger.

For actual routing on page swipe, you would have to look at the routing library you use.
However if you want a quick one inside of a route, you can use a pagingEnabled attribute on a <ScrollView>:
<ScrollView horizontal pagingEnabled>
<View>page 1</View>
<View>page 2</View>
</ScrollView>
edit: my mistake, you are asking in react, i got confused by your react-native tag. please remove that if you do not want a react-native reply

Related

Is it possible to disable scrolling on all NextJS <Link>s by default?

I'm building a site with NextJS and using a fade in and out page transition. I manually scroll the page to the top in between the out and in transitions so the user never sees the jump.
But to do this I am having to set scroll="false" on all <Link> tags.
I am wondering if there's a way to set scroll to false by default on all Link tags, but I haven't been able to find anything on this subject.
One way is to make a custom <Link> component and use scroll="false" on it and import it everywhere you use links.

How to Create Scroll Transition?

I want to add a transition of this type on a website I creating on React. Can some please guide me on how I can achieve this or is there any lib that I can refer?
Scroll Transition
you can use react-scroll for scrolling and effect

Material UI Drawer scrolls background page to top when opening

I am using material-ui as the UI package for an app.
In the app I'm using material-table with a custom infinite scroll.
When a row is clicked, a drawer opens from the right of the webpage.
Once the drawer opens, the background of the drawer (the infinite scroll table and general page) automatically scrolls back to the top of the page.
This makes this page very unfriendly to users.
I've tried the solutions that are mentioned here, but it doesn't seem to work.
I tried to use it like this:
<Drawer ModalProps={{disableRestoreFocus: true}} disableRestoreFocus>{content}</Drawer>
I couldn't find anymore information on material-ui github, or here on stack overflow.
Has anyone encountered this issue or know any other options I can try?
Thanks in advance.
For material-ui v4, you can add this attribute on the drawer component:
disableScrollLock={true}

React Native bottom drawer navigation with sub menus?

I am looking for a bottom navigator react native component that will allow me to have sub menus pop out of it?
I'm thinking of something that looks like this:
React Native Navigator
I have a hard time believing this doesn't exist. Can anyone point me in the right direction? I would really appreciate it.
I would suggest using something like createBottomTabNavigator from React Navigation
That allows for bottom navigation but would also also you to create more than one row like your mock. See this link for more info: How to create a bottom tab navigator with multiple rows?

How to transition into specific part of the page usings its id with gatsby-plugin-transition-link plugin

My website has a navbar with where most of the links scrolls you to a section in the home page.
I want to use gatsby page transition from another page and scroll into that particular section of the home page.
Something like this
<AniLink fade to="/#about-us">
About Us
</AniLink>
I dont find any information about this in the official docs. How would I implement this feature.
I would use Gatsby page transitions on the links to other pages and for the links to anchors on the same page use the smooth-scroll npm package: https://www.npmjs.com/package/smooth-scroll
Here is a medium post on how to set it up with Gatsby also: https://medium.com/#chrisfitkin/how-to-smooth-scroll-links-in-gatsby-3dc445299558
Alternatively, there are some Gatsby plugin options too including this one which looks nice: https://www.gatsbyjs.org/packages/gatsby-plugin-smoothscroll
AniLink is used for "Page transition". In your case, you need "scroll" transition. In other words, you just need smooth scrolling.
You can try react-scroll to achieve that.

Resources