Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
optometrists
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
cache
/
.wp-cli
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
base
/
context
/
providers
:
query-state-context.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { createContext, useContext } from '@wordpress/element'; /** * Query state context is the index for used for a query state store. By * exposing this via context, it allows for all children blocks to be * synchronized to the same query state defined by the parent in the tree. * * Defaults to 'page' for general global query state shared among all blocks * in a view. * * @member {Object} QueryStateContext A react context object */ const QueryStateContext = createContext( 'page' ); export const useQueryStateContext = () => useContext( QueryStateContext ); export const QueryStateContextProvider = QueryStateContext.Provider;