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
I've found out that I'm getting extra Card renders of the when using useRecylingState
console.log("Rendering", item.id);
// A callback when the item is recycled
useRecyclingEffect?.(({ item, prevItem, index, prevIndex }) => {
console.log("Recycled", item.id);
refSwipeable?.current?.close();
});
Double renderings are happening because useRecyclingEffect is happening to often, and useRecyclingState is using useRecyclingEffect inside. From my understanding useRecylingEffect should happen only after screen has left the screen, and not on the first render.
Here is respective logs:
I've found out that I'm getting extra Card renders of the when using useRecylingState
Double renderings are happening because useRecyclingEffect is happening to often, and useRecyclingState is using useRecyclingEffect inside. From my understanding useRecylingEffect should happen only after screen has left the screen, and not on the first render.
Here is respective logs:
I don't really understand mechanics of those hooks, and probably not be able to fix this issue alone.
The text was updated successfully, but these errors were encountered: