UNPKG

state-in-url

Version:

Store state in URL as in object, types and structure are preserved, with TS validation. Same API as React.useState, wthout any hasssle or boilerplate. Next.js@14-16, react-router@6-7, remix@2, and Astro.

2 lines (1 loc) 217 B
"use strict";var u=require("react");function f(t){return t&&t.__esModule?t:{default:t}}var e=f(u);const o=typeof window==="undefined"?e.default.useEffect:e.default.useLayoutEffect;exports.useIsomorphicLayoutEffect=o;