You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The ToolbarItem component throws an error when it is called. For simplicity, I am using the Button component as the rendered component. I have tested the other toolbar components such as ToolbarGroup and ToolbarButton and they have worked perfectly, but for some reason the ToolbarItem returns undefined.
// index.js
import domReady from '@wordpress/dom-ready';
import ToolbarItemButton from './button.js'
import { render } from '@wordpress/element';
domReady( function() {
render(<ToolbarItemButton />, document.querySelector('#toolbar-button') )
})
Error Message
[Error] Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `ToolbarItemButton`.
commitRootImpl (react-dom.js:22842)
commitRootImpl
unstable_runWithPriority (react.js:2820)
commitRoot (react-dom.js:22552)
commitRoot
scheduleUpdateOnFiber (react-dom.js:21559)
scheduleRootUpdate (react-dom.js:24457)
(anonymous function) (react-dom.js:25101)
unbatchedUpdates (react-dom.js:21825)
legacyRenderSubtreeIntoContainer (react-dom.js:25100)
(anonymous function) (index.js:9326)
Editor version (please complete the following information):
WordPress version: 5.5.3
Gutenberg default
Desktop (please complete the following information):
OS: macOS Catalina 10.15.7
Browser: Safari 14
The text was updated successfully, but these errors were encountered:
@TeamDNK In WordPress 5.5.3 the component was still experimental (__experimentalToolbarItem). ToolbarItem will be made stable in WordPress 5.6 - #23316.
Describe the bug
The
ToolbarItem
component throws an error when it is called. For simplicity, I am using the Button component as the rendered component. I have tested the other toolbar components such asToolbarGroup
andToolbarButton
and they have worked perfectly, but for some reason theToolbarItem
returnsundefined
.Error Message
Editor version (please complete the following information):
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: