Skip to content

State change causes chart not to render initially #58

@timbarclay

Description

@timbarclay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions