# extendify/1.17.1/src/Library/state/global.js

Extendify, version 1.17.1. 21 lines.

- Page: https://pluginprobe.com/plugins/extendify/1.17.1/code/src/Library/state/global.js
- Raw: https://pluginprobe.com/plugins/extendify/1.17.1/raw/src/Library/state/global.js
- Modified: 2023-10-20T20:04:20+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/1.17.1/code/src/Library/state/global.js#L10-L20`.

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

const state = (set) => ({
	open: false,
	setOpen: (open) => set({ open }),
	missingCSSVars: [],
	addMissingCSSVar: (varName) =>
		set((state) => {
			if (state.missingCSSVars.includes(varName)) return state;
			return {
				missingCSSVars: [...state.missingCSSVars, varName],
			};
		}),
});

export const useGlobalsStore = create(
	devtools(state, { name: 'Extendify Library Globals' }),
	state,
);

```
