Ollie Block Academy

Introduction to Data Handling

Introduction to Data Module

WordPress’s data module builds on Redux, providing a specialized implementation for the block editor. Accessed through wp.data, it offers select for getting data, subscribe for change notifications, and dispatch for sending actions.

The module provides both higher-order components (withSelect, withDispatch) and modern hooks (useSelect, useDispatch) for React integration. Hooks are the preferred approach for function-based components in modern block development.

While you can interact with wp.data directly in the console for exploration, block development uses React hooks that bridge between React components and the underlying Redux store system.

Back to: Ollie Block Academy > Introduction to Data Handling