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

Extendify, version 0.10.0. 20 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.10.0/code/src/Onboarding/state/Global.js
- Raw: https://pluginprobe.com/plugins/extendify/0.10.0/raw/src/Onboarding/state/Global.js
- Modified: 2022-08-25T21:16:32+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.10.0/code/src/Onboarding/state/Global.js#L10-L20`.

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

const store = (set) => ({
    generating: false,
    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)

```
