UNPKG

@wener/console

Version:

Base console UI toolkit

15 lines (14 loc) 406 B
import { proxyWith } from "@wener/reaction/valtio"; export function usePageLayoutState(page, { initial = {} } = {}) { const state = proxyWith({ name: 'GlobalLayoutState', global: true, storage: true, initialState: { pages: {} } }); state.pages[page] ||= initial; return state.pages[page]; } //# sourceMappingURL=usePageLayoutState.js.map