원클릭으로
reactive-polling
Poll for changes to any value and trigger React re-renders when it changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Poll for changes to any value and trigger React re-renders when it changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Day-to-day coding style and patterns for R3F game development with Miniplex ECS.
Verekia's preferred project setup with Next.js Pages Router, Tailwind 4, oxfmt, oxlint, and TypeScript.
Use Zustand as a simple state store for entity management (not a true ECS).
Attach meshes to bones of a skinned mesh, such as attaching a sword to a character's hand.
Shake the camera when the player takes damage or on impacts for visual feedback.
Display floating damage numbers that animate upward and fade out, with support for critical hits.
| name | reactive-polling |
| description | Poll for changes to any value and trigger React re-renders when it changes. |
Poll for changes to any value and trigger React re-renders when it changes.
Create a useReactive hook that uses useFrame to periodically check a selector function. When the value changes, update React state to trigger a re-render. Throttle with a configurable FPS.
useFrame's fps optionconst useReactive = <T,>(selector: () => T, fps = 30): T => {
const [reactiveValue, setReactiveValue] = useState<T>(selector())
const previousValueRef = useRef(reactiveValue)
useFrame(
() => {
const newValue = selector()
if (previousValueRef.current !== newValue) {
previousValueRef.current = newValue
setReactiveValue(newValue)
}
},
{ fps },
)
return reactiveValue
}
// Usage
const isAboveZero = useReactive(() => position.y > 0)
This skill is part of verekia's r3f-gamedev.