- Copy vim-snake structure stripped of game-specific logic - Remove finalScore calculation (raw data only) - Setup example app with keybinding state management - Empty board renders and waits for game logic
12 lines
204 B
TypeScript
Executable File
12 lines
204 B
TypeScript
Executable File
import { useState, useEffect } from 'react';
|
|
|
|
export const useMounted = () => {
|
|
const [mounted, setMounted] = useState(false);
|
|
|
|
useEffect(() => {
|
|
setMounted(true);
|
|
}, []);
|
|
|
|
return mounted;
|
|
};
|