I'm trying to rebuild and extend the original Wordpress blocks for Buttons & Button.
I created the boilerplate with npx @wordpress/create-block, copied the original code,...
It works as long as I remove the useBlockProps() part.
e.g. here (original file)
[...]
const colorProps = getColorAndStyleProps( attributes, colors, true );
const blockProps = useBlockProps();
return (
<>
<ColorEdit { ...props } />
<div { ...blockProps }>
<RichText
[...]
If I use it, I get Uncaught TypeError: Object(...) is not a function in the console.