next-dev.js:20 Warning: Cannot update a component (`LayerContextProvider`) while rendering a different component (`Frame`). To locate the bad setState() call inside `Frame`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at Frame (webpack-internal:///../../packages/core/dist/esm/index.js:510:18)
at div
at Content (webpack-internal:///../../node_modules/react-frame-component/lib/Content.js:30:5)
at iframe
at Frame (webpack-internal:///../../node_modules/react-frame-component/lib/Frame.js:46:5)
at div
at div
at div
at Viewport (webpack-internal:///./components/editor/Viewport/index.tsx:26:11)
at Events (webpack-internal:///../../packages/core/dist/esm/index.js:2345:19)
at Editor (webpack-internal:///../../packages/core/dist/esm/index.js:2436:19)
To Reproduce
Adding a react-frame-component just ouside the <Frame />
Describe the bug
To Reproduce Adding a react-frame-component just ouside the
<Frame />
Running
yarn start
inexample/landing
I briefly checked the code and found that https://github.com/prevwong/craft.js/blob/46eb68ef54a036f06c9433ee74b2359a8f38c610/packages/core/src/render/Frame.tsx#L39-L60
these lines should be updated in a useEffect instead of render?
Expected behavior No warning
Your environment