Console warning in gutenberg
Hi,
I use some gutenberg blocks made with carbon fields, if I open the console I get 2 warnig:
wp.compose.withState is deprecated since version 5.8. Please use wp.element.useState instead. deprecated.min.js?ver=6c963cb9494ba26b77eb:2
wp.editor.BlockControls is deprecated since version 5.3 and will be removed in version 6.2. Please use wp.blockEditor.BlockControls instead. deprecated.min.js?ver=6c963cb9494ba26b77eb:2
should I be concerned or will it be updated?
These functions used in https://github.com/htmlburger/carbon-fields/blob/932ec6e39fd235d091564704179a64b3882bae0a/packages/blocks/components/block-edit/index.js#L9 have moved place in WordPress Gutenberg API and it seems that they have not been removed yet as the Carbon Fields plugin works just fine otherwise.
With WordPress 6.6.2 I see:
wp.compose.withState is deprecated since version 5.8. Please use wp.element.useState instead.
wp.editor.BlockControls is deprecated since version 5.3 and will be removed in version 6.2. Please use wp.blockEditor.BlockControls instead.
wp.editor.InspectorControls is deprecated since version 5.3 and will be removed in version 6.2. Please use wp.blockEditor.InspectorControls instead.
Fix should be to simply to import the functions from correct paths. I wouldn't worry too much about it, but would keep eye of WP changelog and test that the plugin works on production sites after updates to make sure these functions don't get removed before this has been fixed in Carbon Fields.
Someone has explained the process quite throughly here https://webdevstudios.com/2020/12/29/wordpress-blocks-backwards-compatibility/.
There's also a bunch of other editor warnings at the moment, will see if I could fix some locally...