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
{{ message }}
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Not sure if an issue but would love some ideas or help.
I'm trying to use gatsby-plugin-transition-link, specifically the AniLink part of it. I've set up the transitions and they seem to work fine except for one issue.
I have built a separate component that uses math.floor and math.random to select an image from an array and display a random image from the array on each page load.
The problem is now that I have the transitions it fires the component several times (10ish) resulting in a flickering of random images until it settles on one. Any ideas?
The text was updated successfully, but these errors were encountered:
Hi Patrick, the problem you're facing is that the component is indeed rendered multiple times for a couple of reasons but re-rendering is always going to occur with the mdx/transition setup you have I suspect and in general in React anyway ofc. Gonna spell it out in case someone else ever finds this Issue and needs some pointers.
The cause of your problem is the random number function that gets called on every render and changes the image.
Hello all I'm hoping for a little direction.
Not sure if an issue but would love some ideas or help.
I'm trying to use gatsby-plugin-transition-link, specifically the AniLink part of it. I've set up the transitions and they seem to work fine except for one issue.
I have built a separate component that uses math.floor and math.random to select an image from an array and display a random image from the array on each page load.
The problem is now that I have the transitions it fires the component several times (10ish) resulting in a flickering of random images until it settles on one. Any ideas?
The text was updated successfully, but these errors were encountered: