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
I am using ReactDOM.createPortal to place a component into a location in the DOM. The error Target container is not a DOM element. is being thrown.
Steps to reproduce
this functional component will place a supplied component into the DOM location 'toast-container': const Toast = ({ children }) => ReactDOM.createPortal(children, 'toast-container');
This Toast component is being included within a story:
storiesOf('Elements/Toast', module)
.add('Test', () => (
<InlineWrapper>
<Toast>
<ToastTemplate
id="test"
type='success'
>
Your details have been saved.
</ToastTemplate>
</Toast>
</InlineWrapper>
));
I have defined the DOM location in the html file located at storybook/index.html and have also tried doing the same in 'storybook/iframe.html' :
I am using
ReactDOM.createPortal
to place a component into a location in the DOM. The errorTarget container is not a DOM element.
is being thrown.Steps to reproduce
this functional component will place a supplied component into the DOM location 'toast-container':
const Toast = ({ children }) => ReactDOM.createPortal(children, 'toast-container');
This
Toast
component is being included within a story:I have defined the DOM location in the html file located at
storybook/index.html
and have also tried doing the same in 'storybook/iframe.html' :Please specify which version of Storybook and optionally any affected addons that you're running
The text was updated successfully, but these errors were encountered: