diff --git a/src/components/Kitty.tsx b/src/components/Kitty.tsx index 7b861e5..705f28a 100644 --- a/src/components/Kitty.tsx +++ b/src/components/Kitty.tsx @@ -52,8 +52,8 @@ export const Kitty = (props: { setWidth(`${width}px`); setHeight(`${height}px`); - setContext((ctx) => ({ ...(ctx ?? { active: false }), rows, cols })); - }, []); + setContext({ id, rows, cols }); + }, [id]); useEffect(() => { if (!container.current) return; @@ -71,7 +71,7 @@ export const Kitty = (props: {