The onSelect and onOpenClose callbacks are currently called from within a setState() hook.
If I have some code in my callback function to modify my app state (which, in turn, will cause another component to re-render), I get the dreaded "cannot update a component while rendering a different component" error in the console.
I've fixed it for now by removing the callbacks, and instead, just having this in the main component body, but there may be a better solution:
Hi,
The onSelect and onOpenClose callbacks are currently called from within a setState() hook. If I have some code in my callback function to modify my app state (which, in turn, will cause another component to re-render), I get the dreaded "cannot update a component while rendering a different component" error in the console. I've fixed it for now by removing the callbacks, and instead, just having this in the main component body, but there may be a better solution: