-
Notifications
You must be signed in to change notification settings - Fork 389
Description
Describe the bug
The conversion to hooks in #625 has caused unintentional breaking changes.
The use of useEffect is not a drop-in replacement of componentWillMount, componentDidMount, componentDidUpdate, etc. It is triggered at a different time, so things are in different states which leads to bugs. The editorWillMount, editorDidMount, and editorWillUnmount callbacks probably need to be reconsidered to match the new semantics of useEffect.
To Reproduce
One example is caught by our CI on an automatic depdendabot update.
https://github.com/pybricks/pybricks-code/actions/runs/3576716352/jobs/6014862442
Expected behavior
Breaking changes should come with a major version bump and a migration guide.
Screenshots/Logs
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
-
OS: [e.g. Linux]
-
Browser [e.g. Firefox, Safari]
-
Bundler [e.g. webpack]
-
I will try to send a pull request to fix this issue.