Lately I’ve been working on a WordPress Gutenberg plugin. The official WordPress documentation has always been a bit hit and miss due to them changing things so frequently but it’s been good for getting the initial plugin development environment setup. Unfortunately, within an hour of development I stumbled into my first big problem; several of the controls do not seem to exist!
ComboboxControl and the Flex Controls are the two that I wanted to use and despite being covered in the docs they are not actually included with the built in Gutenberg. If you try to use them the block will fail with the dreaded generic error:
"This block has encountered an error and cannot be previewed"
In the browser console you will see the following error:
wordpress react Warning: React.createElement: type is invalid -- expected a string
The solution is quite simple; install the Gutenberg plugin! The one that is bundled with WordPress is an older version. The main Gutenberg plugin project is very active and frequently updated:
That should solve most of your missing component problems. I actually got double unlucky as this latest Gutenberg version still does not include the ComboboxControl but I suspect that is due to some big changes they have been making to it which are covered in this pull request.