woocommerce/plugins/woocommerce-blocks/assets/js/data
Mike Jolley 5165611e45 Remove deprecated data controls in favour of those from the `@wordpress/data` package (https://github.com/woocommerce/woocommerce-blocks/pull/5574)
* Remove expected warnings from test suite

* Switch dispatch and select usage to `controls`, from `@wordpress/data`

* Wrap render with act

* resolveSelect to wait for resolution

* resolveSelect
2022-03-10 13:22:05 +00:00
..
cart Remove deprecated data controls in favour of those from the `@wordpress/data` package (https://github.com/woocommerce/woocommerce-blocks/pull/5574) 2022-03-10 13:22:05 +00:00
collections Remove deprecated data controls in favour of those from the `@wordpress/data` package (https://github.com/woocommerce/woocommerce-blocks/pull/5574) 2022-03-10 13:22:05 +00:00
query-state Remove v1 from Store Keys (https://github.com/woocommerce/woocommerce-blocks/pull/5987) 2022-03-04 14:03:52 +00:00
schema Remove deprecated data controls in favour of those from the `@wordpress/data` package (https://github.com/woocommerce/woocommerce-blocks/pull/5574) 2022-03-10 13:22:05 +00:00
utils Update NPM dependencies and script dependency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1337) 2019-12-10 12:17:46 -05:00
README.md All Products with Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1032) 2019-10-28 09:53:09 -04:00
constants.ts Implement memoization in several selectors and hooks (https://github.com/woocommerce/woocommerce-blocks/pull/4548) 2021-08-13 15:28:41 +02:00
default-states.ts Implement memoization in several selectors and hooks (https://github.com/woocommerce/woocommerce-blocks/pull/4548) 2021-08-13 15:28:41 +02:00
index.ts Implement memoization in several selectors and hooks (https://github.com/woocommerce/woocommerce-blocks/pull/4548) 2021-08-13 15:28:41 +02:00
mapped-types.ts Update WordPress Monorepo packages with React 17x support (https://github.com/woocommerce/woocommerce-blocks/pull/5223) 2021-12-07 15:47:50 +00:00
shared-controls.ts Store API: Introduce API Versioning System (https://github.com/woocommerce/woocommerce-blocks/pull/5911) 2022-02-23 12:00:45 +00:00
tsconfig.json Open Mini Cart drawer when adding to cart from the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/4772) 2021-09-21 15:25:44 +02:00
types.ts Rest API batching support (2) (https://github.com/woocommerce/woocommerce-blocks/pull/4075) 2021-04-20 16:44:49 +01:00

README.md

This folder contains all the data stores registered with wp.data for use by various blocks. Store keys are exported as constants on the wc.wcBlocksData export (external registered as @woocommerce/block-data and enqueued via handle wc-blocks-data-store). For any block using the store, make sure you import the store key rather than using the reference directly to ensure dependencies are automatically extracted correctly.

It is assumed there is some familiarity already with interacting with the wp.data api. You can read more about that here.

The following stores are registered:

store description store key
schema Used for accessing routes. Has more internal usage. SCHEMA_STORE_KEY
collections Holds collections of data indexed by namespace, model name and query string COLLECTIONS_STORE_KEY
query-state Holds arbitrary values indexed by context and key. Typically used for tracking state of query objects for a given context QUERY_STATE_STORE_KEY