Skip to content
Advertisement

Tag: react-window

react-window rows call useState

I’m trying to render a stateful component inside react-window rows (using FixedSizeList), but their state (useState) is not maintained when they get re-rendered so it resets every time I scroll back to them. This makes sense because they’re getting unmounted, but is there a way prevent re-rendering via memo or useCallback? I’ve seen some examples of avoiding re-renders, but I

Advertisement