ziko
Version:
A versatile JavaScript library offering a rich set of Hyperscript Based UI components, advanced mathematical utilities, interactivity ,animations, client side routing and more ...
15 lines (13 loc) • 335 B
TypeScript
import { mapfun, MapfunResult } from "../math/utils/mapfun.d.ts";
import { useState } from "./use-state.d.ts";
export function useReactive<
T
>(
nested_value: T
): MapfunResult<
(n: any) => {
get: ReturnType<typeof useState<any>>[0];
set: ReturnType<typeof useState<any>>[1];
},
T
>;