I couldn't find any open issues or examples of this, but when i render elements under the InfiniteViewer component and they are added after the infinite viewer is initially rendered, then they aren't being updated via the translate effect that infinite viewer does.
Is there something on my end I'm missing or is it not something the library supports for now?
Items that exist initially render completely fine and don't have any issues
A simplified example would look like this
function App() {
// items are initially empty
const [items, setItems] = useState([]);
// add a new item once a second
useEffect(() => {
setTimeout(() => {
setItems((prev) => ([...prev, <div style={{ left: 50, top: 50 }} />]));
}, 1000);
}, []);
return <InfiniteViewer>{items}</InfiniteViewer>;
}
I couldn't find any open issues or examples of this, but when i render elements under the
InfiniteViewer
component and they are added after the infinite viewer is initially rendered, then they aren't being updated via the translate effect that infinite viewer does.Is there something on my end I'm missing or is it not something the library supports for now?
Items that exist initially render completely fine and don't have any issues
A simplified example would look like this