Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(helper): effects are not cleaned up in @storyblok/field-plugin/re…
…act (#417) ## What? In `@storyblok/field-plugin/react`, the effects are not being cleaned up, because the cleanup function is not returned from the `useEffect` callback. I also don't see any cleanup in the Vue 3 helper, but I am not addressing this in this PR. (SHAPE-7195) ## Why? JIRA: SHAPE-7192 Effects must be cleaned up. ## How to test? (optional) The demo app uses `@storyblok/field-plugin/react`: 1. Run `yarn workspace demo dev` 2. Open the sandbox https://plugin-sandbox.storyblok.com/field-plugin?url=http%3A%2F%2Flocalhost%3A8080%2F The app should work normally. You don't normally notice the lack of cleanup, but in local development mode, you'd see the effects run at least twice, and possibly even more if you're modifying the helper itself.
- Loading branch information