I used to have the same problem. After I updated WordPress, window.wp.data.useDispatch was available.
I’m guessing you also have an out of date WordPress / Gutenberg
Related Posts:
- lodash dependency in a Gutenberg plugin
- creating elements/innerblocks via rangecontrol
- Looking for callback function after Gutenberg is rendered?
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- How to prevent UNDO on guternberg block editor
- Do I have to worry about useState causing a re-render?
- Creating a custom Gutenberg block with columns
- Gutenberg: import dependency or assign from global variable?
- How to control an elements classes from multiple Gutenberg sidebar controls?
- Developing the save function in Gutenberg blocks
- Gutenberg – is it ok to load dependencies multiple times?
- Preventing double loading JS scripts (like React) when developing for Gutenberg
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- Rerender core Templates with with ToggleControl but it doesnt recognize block type
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- What happens/fires when you select a block in the editor?
- Is “document loaded” different on admin side than public side?
- How to use setAttributes outside of the edit function return
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Reading plugin settings in esnext wordpress block
- How can i add insertion point between inner blocks in my custom block like core blocks
- Reinitiate Gutenburg’s blocks using javascript
- How to include jQuery and JavaScript files correctly?
- How to use PanelColorSettings in custom Gutenberg block?
- How can I run AJAX on a button click event?
- Can I use the wp media uploader for my own plugin?
- Customizing the 3.5 “Add Media” popup (Backbone.js)
- Test to see if jQuery or Prototype is queued by another plugin?
- jQuery in header or footer
- Hook the Keydown Event in the TinyMCE Post Editor
- Adding pre-publish checks with Gutenberg
- Managing two editable fields in gutenberg
- How to make repeated component/block in Gutenberg
- How to save block attributes when the output doesn’t change
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- wp_localize_script $handle
- How do I only load js on the post-new.php and post.php pages in admin?
- What’s the Right Way to get and save remote data for a Gutenberg block?
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- How to disable “Transform to” option in Gutenberg custom blocks
- Create custom blocks for bootstrap
- Passing select control value to block
- Saving data from block editor to the database
- How do I store information in a dynamic block in WordPress?
- How to Load Plugin JS in theme’s footer section
- Initial help with official “create a block” tutorial
- How do I dynamically render an InnerBlock inside a dynamic block?
- Gutenberg Block showing invalid content on edit
- Gutenberg blocks not getting styled on back end
- How to add Internationalization in WordPress using Javascript/React?
- Run code once when block is created
- Best way to save custom css for an block
- How can I listen to events in Gutenberg block?
- It’s possible to passing a ref to FormTokenField from parent component using forwardRef?
- WP Gutenberg Blocks – How to limit first/root blocks
- ResizableBox with RangeControl not working
- add javascript files only when plugin is called?
- Gutenberg table block with Bootstrap .table class
- How to add a gradient component to a custom block
- Run JavaScript validation script on form submit in plugin
- Custom Plugin – CSS works, JS doesn’t
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- How to use apiFetch to get author information in Gutenberg properly?
- Gutenberg blocks error: Each child in a list should have a unique “key” prop
- How to add a panel/box/widget/are/screen to the right side of edit post/page confusion
- Service Worker Uncaught (in promise) DOMException
- How to properly package a block plugin
- Setting global block attribute value
- About a programming language starts with [closed]
- Should I put my plugin javascript inline?
- Modify custom block plugin without losing content
- Custom Block Not Shown in Block Inserter
- wp.media libary pdf type
- Query String Filtering API
- How to extend SelectControl with data from my theme
- Gutenberg block breaks when showing new data
- How to re-render inspector controls?
- jQueryUI draggable doesn’t work in WordPress plugin
- Get value of custom checkbox from Gutenberg sidebar in plugin
- Where to save Gutenberg plugin data?
- Load script on frontend from widget plugin
- Gutenberg component in a plugin admin
- Append php file to footer
- XMLHttpRequest to open PHP file responds with Missing Page
- Filterable posts using categories
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- Undo operation not working in Rich text [Gutenberg]
- How react js and other Javascript Technologies works on WordPress plugin?
- get the queried_object of an url
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Build a dynamic block using the default attributes
- Add custom data-attribute to core Gutenberg block within an template
- How to replace content of a block in and re-render on change?
- extending a core block doesn’t work inside the editor
- Trouble Importing whatsapp-web.js in a WordPress Plugin Development
- Remove Gutenberg Buttons Block