Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
outer: async (getStory, context) => {
const node = useMemo(() => document.createElement('div'), [context.kind, context.name]);
useEffect(() => () => ReactDOM.unmountComponentAtNode(node), [node]);
await render(getStory(context), node, context);
return node;
},
});
const reactDecorator = (story, context) => {
const node = useMemo(
() => document.createElement('div'),
[context.kind, context.name]
);
useEffect(() => () => ReactDOM.unmountComponentAtNode(node), [node]);
ReactDOM.render((
{story()}
), node);
return node;
};