Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
wp-content-20241001222009
/
plugins
/
astra-sites
/
inc
/
lib
/
onboarding
/
assets
/
src
/
store
:
store.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import React, { createContext, useContext, useReducer } from 'react'; export const StateContext = createContext(); export const StateProvider = ( { reducer, initialState, children } ) => ( <StateContext.Provider value={ useReducer( reducer, initialState ) }> { children } </StateContext.Provider> ); export const useStateValue = () => useContext( StateContext );