UNPKG

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 ...

16 lines (15 loc) 326 B
import { mapfun } from '../math/index.js' import { useState } from './use-state.js' const useReactive = (nested_value) => mapfun( n => { const state = useState(n) return { get : state[0], set : state[1], } }, nested_value ) export{ useReactive }