• It seems there are two valid ways to read and update post data from inside a component.
    1. withSelect/withDispatch( … )(componentName)
    2. access the data API directly using wp.data.select(‘core/editor’), or wp.data.dispatch( ‘core/block-editor’ )

    The first way seems to be the accepted way. However, implementation and maintenance seems simpler with the second way. What is the advantage of using the withSelect/withDispatch High Order components?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘withSelect and withDispatch’ is closed to new replies.