Ok, this is probably the easiest workaround I was able to find, but if someone has better idea, then feel free to post it here 😉
import {
__experimentalUseInnerBlocksProps,
useInnerBlocksProps,
} from '@wordpress/block-editor';
if( typeof useInnerBlocksProps == 'undefined' ){
var compatibleUseInnerBlocksProps = __experimentalUseInnerBlocksProps;
}else{
var compatibleUseInnerBlocksProps = useInnerBlocksProps;
}
- so basically I can import both (experimental and no-experimental) without any error
- then I can just do simple type test if the new one is already supported
- if it’s supported I will remember it in
compatibleUseInnerBlocksPropsvariable - otherwise I will remember old experimental
- then I need to replace all other occurrences of
useInnerBlocksPropswithcompatibleUseInnerBlocksPropsin my code
Related Posts:
- Passing select control value to block
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to create custom embed block in gutenberg wordpress
- How to use get_theme_mod in gutenberg editor wordpress?
- How to add Internationalization in WordPress using Javascript/React?
- how to disable blockrenderAppender inside all Innerblocks?
- Using SVN to upload plugin created with gutenberg blocks
- How to export post 2 posts WordPress plugin data [closed]
- WP All Import – Execute Imports
- How to add custom table style for table block in gutenberg editor
- Gutenberg Block Style CSS Class Is Not Applying on Backend
- Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- Plugin generating unexpected output – on WP mysql dump import
- Use a custom block in another block
- Gutenberg default attributes are empty when accessing in edit
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Has blocks gutenberg block multiples registers type in my Plugin
- Fixed: Console.log twice in the edit function
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- How to dynamically add template in Innerblock?
- best way to upload a large file to wordpress using wp all import
- Block content rendering on the top just below body tag
- Gutenberg: Dynamic Block – Show saved data in the editor
- Create plugin with multiple blocks
- How do I set register_meta for a specific CPT?
- How do I save meta key value in the save function?
- Update Content for a Custom Block Toolbar Button
- Wrong block appender button showing
- How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
- Vanilla javascript in custom gutenberg block not working
- WordPress custom block: Link saved in database not retrieved when editing post
- Why is my Gutenberg block not saving and rendering the chessboard?
- How can we extent core/group or cover block?
- How to change the version of block.js and plugin to the same of Package.json?
- How to prevent WP All Export from wrapping XML nodes in CDATA? [closed]
- How do I apply different block supports to different parts of my custom block?
- Custom Gutenberg blocks not showing in WP editor
- Uninstall, Activate, Deactivate a plugin: typical features & how-to
- How do you debug plugins?
- Add multiple plugin directories
- What are the differences between WPINC and ABSPATH?
- Where do I put the code snippets I found here or somewhere else on the web?
- Giving Multiple Authors Access to a Plugin’s WP.org Repo
- How to stop showing admin notice after close button has been clicked
- How to save the values of checkbox to the register setting?
- Creating a default Custom Post Template that a Theme can override
- Handling jQuery Component Collision
- How to get Login Error messages on a custom template
- Why doesn’t the WordPress Importer update posts?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- How do I check if my $wpdb->insert() was successful?
- Claim Listing functionality – how to send email to users when their claim has been approved or denied
- Creating a theme option page?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Add post thumbnail from external image with plugin
- Where is the source code that makes the “all” array grabs filters in the $wp_filter?
- Options page not displayed under Settings menu
- Is it possible to add an action to the currently running action?
- Created Widget Not Showing up on Admin Panel
- How to include and use custom class files in plugin?
- Action on post publish
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- wp_enqueue_scripts not working inside shortcode
- How to prevent action in ajax request, when in admin side?
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- unzip a folder on specific location and delete the zip file
- Handling jQuery Component Collision
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Changing labels of status filters for post grid
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- Plugin version is not showing up in wordpress.org plugin directory
- Own plugin corrups plugin-activation
- wordpress plugin is not activating from widget
- uninstall.php file in Plugin to clean DB
- CSV file generation failing
- finding whether request is for post, and post id
- How to get specific setting by settings_fields()?
- Save / Show multi line text in metabox
- Gutenberg block can’t save richtext
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- Add Plugin options as subpage to Theme options page
- Image upload and download from front-end
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- correct way to include a library(and its dependent libraries) in wordpress development
- Issue Tracker from pre exsisting table [closed]
- WP_Terms_List_Table Quick Edit not working
- Git Hosting for WordPress SVN Plugin Repository [closed]
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to exclude certain files from the plugin editor?
- WordPress and a secondary database?
- wp_handle_upload – specified file failed upload test
- how to make wordpress remember my choice
- Meta box not displaying on the plugin page
- wordpress admin-ajax bad request 400
- public custom posts not showing in my wordpress plugin
- Plugin question, How to insert a colon in a value box
- Need a Category List for the category slug