1234567891011121314151617181920 |
- type Hook[T]
- &(&(T) => Component) => Component;
- export function use:[T]
- &(Hook[T], &(T) => Component) => Component
- &(hook, k) => { hook(k) };
- export function State:[T]
- &(T) => Hook[Reactive[T]]
- &(initial) => &(k) =>
- \ r := sync { Reactive initial },
- { k(r) };
- export function Effect:
- &(Async[never]) => Hook[unit]
- &(effect) => &(k) =>
- { k() }
- .{ with effect };
|