Banksy’s Dad
Banksy’s Dad
TTCTheo's Typesafe Cult
Created by Banksy’s Dad on 4/21/2024 in #questions
re-render issue loading fabric.js components in a react-slick carousel
I have a single fabric.js component, but pass it a photoId and IdCode which had 95 variations of how to place the photo. I also have a react slick carousel with 8 slides. And 4 other carousels with 2 slides each. Each one is the same fabric.js component with a different id code. All being passed the same photoId. I am using ‘progressive’ as the last load function. So it loads and renders the first slide first. Then in the background loads the other 7 slides. (Or one slide for the 2 slide carousels.) My issue is that I have other components on the page, and they re render each time a new fabric component loads in the background. So the other components flash 7 times.
At first thought it may be a zustand issue. But I don’t know. I’ve considered switching to recoil. But I feel it will be a lot of work updating the rest of my app. Especially if that isn’t the issue. Is there any way I can prevent my other components from flashing each time my fabric components load in the background. I appreciate anyone’s help. Tried many things and haven’t been able to figure it out. 🙏
2 replies