export { withPageContext } from './withPageContext.js'; export { createWrapped as create, useStoreVanilla }; import type { Create, StoreVanilla, StoreHookOnly } from './types.js'; /** * Same API as Zustand's `create()`: * * `const useSomeStore = create(stateCreatorFn)` * * https://github.com/vikejs/vike-react/tree/main/packages/vike-react-zustand */ declare const createWrapped: Create; /** * Sometimes you need to access state in a non-reactive way or act upon the store. For these cases, you can use `useStoreVanilla` to directly access the vanilla store. * * ```ts * import { useStoreVanilla } from 'vike-react-zustand' * import { useStore } from './store' * * function Component() { * const storeVanilla = useStoreVanilla(useStore) * function onClick() { * storeVanilla.setState({ ... }) * } * } * ``` * * ⚠️ Note that middlewares that modify set or get are not applied to `getState` and `setState`. * * * https://github.com/vikejs/vike-react/tree/main/packages/vike-react-zustand */ declare function useStoreVanilla(useStore: StoreHookOnly): StoreVanilla;