Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad setState ERROR #715

Open
DzmitryHarnakou1 opened this issue Dec 18, 2024 · 0 comments
Open

Bad setState ERROR #715

DzmitryHarnakou1 opened this issue Dec 18, 2024 · 0 comments

Comments

@DzmitryHarnakou1
Copy link

Describe the bug
Since version 0.2.6 complex user components (Has several inside)when dropping them from palette to Frame causes warning:
Warning: Cannot update a component (Component) while rendering a different component (ke). To locate the bad setState() call inside ke, follow the stack trace as described in https://reactjs.org/link/setstate-in-render.
Possibly it was introduced by link, after debugging warning happen right after actions.history.ignore().addLinkedNodeFromTree(tree, nodeId, id)
call in Element component.

To Reproduce
Steps to reproduce the behavior:

  1. Open link,
  2. Drop component twice
  3. See console.

Expected behavior
No such Warning's

Screenshots
0.2.6
image
image
0.2.5
image

Additional context
For different components it could happen in different steps.

Your environment

Software Version(s)
craft.js 0.2.6
React 18.3.1
TypeScript 5.6.2
Browser Chrome
npm/Yarn npm
Operating System MacOs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant