Describe the bug
When passing a state setter to the onError prop of MDXEditor, React prints a warning similar to
hook.js:608 Cannot update a component (`DocumentPage`) while rendering a different component (`RealmWithPlugins`). To locate the bad setState() call inside `RealmWithPlugins`, follow the stack trace as described in https://react.dev/link/setstate-in-render
Reproduction
https://stackblitz.com/edit/github-qekvbmto?file=package.json
To Reproduce
Steps to reproduce the behavior:
- Navigate to the link above
- Open dev console
Expected behavior
No errors or warnings are presented to the developer in the console
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
Additional context
My hunch is this is due to the way gurx propagates values on change- perhaps instead of calling onError directly in the signal setup in the core plugin, using an effect would stop this from happening.
Describe the bug
When passing a state setter to the
onErrorprop ofMDXEditor, React prints a warning similar toReproduction
https://stackblitz.com/edit/github-qekvbmto?file=package.json
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No errors or warnings are presented to the developer in the console
Desktop (please complete the following information):
Additional context
My hunch is this is due to the way gurx propagates values on change- perhaps instead of calling
onErrordirectly in the signal setup in the core plugin, using an effect would stop this from happening.