What is the WordPress block editor’s `@wordpress/data` store and how does it enable component communication?

WordPress Fundamental Hard

WordPress Fundamental — Hard

What is the WordPress block editor’s `@wordpress/data` store and how does it enable component communication?

Key points

  • `@wordpress/data` is a state management system in WordPress block editor
  • Components can subscribe to state changes using hooks like useSelect
  • Enables decoupled components to communicate without passing props
  • Registered stores like core/editor, core/blocks hold application state
  • Inspired by Redux but tailored for WordPress block editor

Ready to go further?

Related questions