Creates a mutable reference that persists across refreshes and never causes refresh when .current is changed.
This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks.
The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.
Ideal for: mutable game data (position, velocity, timers, audio nodes, DOM refs, previous values), methods, etc.
Special usage: pass the self symbol to get a stable reference to the current entity's KaylaRectEntity.
Creates a mutable reference that persists across refreshes and never causes refresh when
.currentis changed.This hook MUST be called at the top level of a component function — never inside loops, conditions, nested functions, or callbacks. The call order of all hooks is strictly fixed across every refresh; reordering calls will corrupt internal state.
Ideal for: mutable game data (position, velocity, timers, audio nodes, DOM refs, previous values), methods, etc. Special usage: pass the self symbol to get a stable reference to the current entity's KaylaRectEntity.