PullState
You can use Vike with PullState.
This page documents how to manually integrate PullState.
There isn't a Vike extension for PullState yet, but contributions welcome to create one.
Initial state
When using a store such as PullState, your components don't access fetched data directly: your components only access the store.
Integration example:
- Get the initial SSR state of the store and make it available as
pageContext.initialStoreState
.For example in
onAfterRenderHtml()
, oronRenderHtml()
if you don't usevike-react
/vike-vue
/vike-solid
.See also: API >
pageContext
> Custom. - Make
pageContext.initialStoreState
available on the client-side.See API >
passToClient
. - Initialize PullState on the client-side with
pageContext.initialStoreState
.For example in
onBeforeRenderClient()
, oronRenderClient()
if you don't usevike-react
/vike-vue
/vike-solid
.
See also: