Slide 19
Slide 19 text
const { dispatch , withDispatch } = wp.data;
dispatch( “data/module” ).actionFunction( parameters )
dispatch( “core” ).saveEntityRecord( type, entity )
dispatch( “core/blocks” ).addBlockTypes( blockType )
dispatch( “core/block-editor” ).selectBlock( blockId )
dispatch( “core/editor” ).savePost()
dispatch( “core/edit-post” ).togglePublishSidebar()
dispatch( “core/notices” ).createNotice( status, content )
JavaScript