WordPress Data: Putting it all together and registering your store!

This entry is part 11 of 15 in the series, A Practical Overview of the @wordpress/data API

To recap: so far in the series we’ve looked at the various properties of the configuration object for a store: selectors: which interface with the store for retrieving data from its state. actions: (actually action creators) which are used to dispatch action objects for handling by the reducer. reducer: which receives dispatched actions and determines […]

WordPress Data: Interfacing With the Store

This entry is part 12 of 15 in the series, A Practical Overview of the @wordpress/data API

Now that we have our new custom data store registered, we need to start integrating it with our example app. There are numerous ways in which you can interface with the data store in your components but I’m going to cover the four most common, straightforward ways. withSelect( mapToProps )( Component) withSelect is a higher […]