You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am loving how simple yet efficient this slider is, thank you!
I am however struggling to update the default slide dynamically with the route name (or a prop passed in route), it seems the Slider doesn't get re rendered with the rest of the page. I am using Hooks, and the latest (18.1) version of React
I have tried
using a prop to fill the value of SlideIndex
using use/setState to return a different number that I call on the SlideIndex Prop,
using use/setState to return to return the whole component with a different SlideIndex Prop
have the slider as an external component and a nested component.
forceUpdate
None of it made any difference (and updating the Props should, to my understanding, have caused a component rerender).
It does work when navigating away to a page with a different component, and then back to a page using the slider Component. Data also updates when displaying text on the page, so the page is refreshing properly.
Nothing seems to work, which leads me to thing the Slider gets created once and doesn't rerender.
Is there a way I could force the instance to recreate, or use a function to set the Slide Index?
Thank you,
Deborah
The text was updated successfully, but these errors were encountered:
Hi,
I am loving how simple yet efficient this slider is, thank you!
I am however struggling to update the default slide dynamically with the route name (or a prop passed in route), it seems the Slider doesn't get re rendered with the rest of the page. I am using Hooks, and the latest (18.1) version of React
I have tried
None of it made any difference (and updating the Props should, to my understanding, have caused a component rerender).
It does work when navigating away to a page with a different component, and then back to a page using the slider Component. Data also updates when displaying text on the page, so the page is refreshing properly.
Nothing seems to work, which leads me to thing the Slider gets created once and doesn't rerender.
Is there a way I could force the instance to recreate, or use a function to set the Slide Index?
Thank you,
Deborah
The text was updated successfully, but these errors were encountered: