Uncaught Invariant Violation: Minified React error #200
mikekoro opened this issue · comments
This is the error I get when I attempt to run a dev version of the plugin. Is there any way to fix it?
The reason I am trying to run it in dev mode is to add an additional button to "sidebar__menu" (not a plugin that goes inside the drop down menu, but a "top level button", which should be right next to the current sidebar button). Perhaps, there is a way to achieve it through "sidebarRendererFn"? Or just simply add a button to each block. Anything would work in my case. @
Hi, @mikekoro !
Currently the only extension available is the insertion of new plugins as additional button in the Sidebar
. The functionality you mentioned would be possible with the insertion of a custom SideMenu
component in the Sidebar
. As a example, follow the dev mode procedures, but access localhost:8080/#
(without the /dev
, we will fix that ), try this duplication and see if it shows the desired behavior:
src/plugin/Sidebar.js
<ul className="sidebar__sidemenu-wrapper">
<SideMenu
i18n={this.props.i18n}
editorState={this.props.editorState}
onChange={this.onChange}
plugins={this.getValidSidebarPlugins()}
maxSidebarButtons={this.props.maxSidebarButtons}
editorHasFocus={this.props.editorHasFocus}
hideSidebarOnBlur={this.props.hideSidebarOnBlur}
modalOptions={this.props.modalOptions}
/>
//Duplicated
<SideMenu
i18n={this.props.i18n}
editorState={this.props.editorState}
onChange={this.onChange}
plugins={this.getValidSidebarPlugins()}
maxSidebarButtons={this.props.maxSidebarButtons}
editorHasFocus={this.props.editorHasFocus}
hideSidebarOnBlur={this.props.hideSidebarOnBlur}
modalOptions={this.props.modalOptions}
/>
</ul>