Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone, I am trying to create a React page slider app with 3 simple page components (home, about, contact). I created a component PageSliderMgr to slide the current page out of the view and slide in the page on the link. The problem is that the transition animation only works when you click on the menu option for the current page then click on the menu for any other page. For example when you first go the page, the animation works. If you click any other page it does not work. If you click on the menu option for whatever the current page is, then click on another page, it works. It has to do with forcing a rendering, but everything I've tried cause an infinite rendering loop. I need help and advice to solve this issue. Thanks in advance.

the project online: React App[^]

the code: GitHub - quisqueya/simpleSlider[^]

What I have tried:

I've tried many ways to force a rerender using state variables but it has always ended up in a loop.
Posted
Updated 30-Jul-20 7:38am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900