Skip to main content

useState

Callable

  • useState<T>(meta, key, initial, store): Ref<T>

  • Return a new Ref containing the state for the given meta.name and key.

    @example
    const app = { name: 'my-app' };
    const counterRef = useState(app, 'counter', 1);
    counterRef.current += 1;