Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State change causes chart not to render initially #58

Open
1 of 3 tasks
timbarclay opened this issue Nov 26, 2024 · 1 comment
Open
1 of 3 tasks

State change causes chart not to render initially #58

timbarclay opened this issue Nov 26, 2024 · 1 comment

Comments

@timbarclay
Copy link

Description

If state is updated in useEffect, the initial render of the chart fails to happen.

Link to Reproduction

https://stackblitz.com/edit/stackblitz-starters-21kxf1?file=app%2Fpage.tsx

Steps to reproduce

  1. Go to https://stackblitz.com/edit/stackblitz-starters-21kxf1?file=app%2Fpage.tsx
  2. Click on "Show chart"
  3. Note that no chart appears
  4. If you toggle "Show chart" off and on again it does show

If you comment out the useEffect call, the issue does not happen.

JS Framework

Nextjs (TS)

Version

1.4.0

Browser

Chrome 131

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

This may be related to #37 since that error is logged in the console, but this seems like a more serious because it prevents the chart appearing at all to begin with.

@timbarclay timbarclay changed the title UseEffect causes chart not to render initially State change causes chart not to render initially Nov 26, 2024
@sergioisidoro
Copy link

Same thing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants