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-15, react-router@6-7, and remix@2.

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