# extendify/0.9.3/src/Onboarding/state/Global.js

Extendify, version 0.9.3. 21 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.9.3/code/src/Onboarding/state/Global.js
- Raw: https://pluginprobe.com/plugins/extendify/0.9.3/raw/src/Onboarding/state/Global.js
- Modified: 2022-07-29T23:10:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.9.3/code/src/Onboarding/state/Global.js#L10-L20`.

```javascript
import create from 'zustand'
import { devtools, persist } from 'zustand/middleware'

const store = (set) => ({
    generating: false,
    generatedPages: {},
    orderId: null,
    setOrderId(orderId) {
        set({ orderId })
    },
})
const withDevtools = devtools(store, { name: 'Extendify Launch Globals' })
const withPersist = persist(withDevtools, {
    name: 'extendify-launch-globals',
    getStorage: () => localStorage,
    partialize: (state) => ({
        orderId: state?.orderId ?? null,
    }),
})
export const useGlobalStore = create(withPersist)

```
