Closed b3ernardo closed 3 months ago
Edit: I solved it by destroying and recreating the chart. However, this is not an ideal solution, and I'm wondering if there's a better approach.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am using three useState hooks to manage the state of my options. This is necessary because the min and max parameters of xaxis can change dynamically based on the startDate and endDate values retrieved from a ContextAPI.
However, I encounter an issue where the chart crashes every time I attempt to set new options to update these parameters. It seems to occur consistently whenever the options' state changes. Is there a recommended approach for updating the options while working with Next.js?
Code above: