Skip to content
Bug reportNov 30, 2026· 0:28· 12 views

Recharts 3.11.3 / React 18: Line shows solid for one frame before entrance animation

0:28 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

mediumRecharts Line entrance animation initialization. The initial animated path state (for example the stroke-dash or clip at progress 0) appears to be applied after the first paint instead of before it. The page's 'BusyCommit 30 ms' setting suggests a timing issue between the React 18 commit and the animation start.
os: macOSdpr: 1react: 18.3.1locale: en-USbrowser: Chromium 151.0.7922.34delivery: esm.sh CDNrecharts: 3.11.3timezone: Europe/Berlinviewport: 1280x720page_title: Recharts 3.11.3 / React 18: Line flash bugtest_page_setting: BusyCommit 30 ms

Repro steps

  1. 1.Open the test page 'Recharts 3.11.3 / React 18: Line flash bug'. It contains a Line chart and a counter that reads 'First frame solid: N of M mounts'.
  2. 2.Observe the counter after the initial mount.
  3. 3.Click the 'Mount 10 times' button.
  4. 4.Watch the counter while the chart remounts and replays its entrance animation.
  5. 5.Click 'Mount 10 times' again.
  6. 6.Watch the counter after the second batch finishes.

Expected

On each mount, the first painted frame of the Line should be empty or at the animation start state. The line should then draw in progressively from Page A to Page G. The counter should read 0 solid first frames.

Actual

Every mount is reported as solid on its first frame. The counter reads 1 of 1 at 1.0s, 11 of 11 at 13.0s and 21 of 21 at 21.0s. The draw-in animation itself does run after that first frame: partial lines are visible at 9.0s, 11.0s, 19.0s and 21.0s. This means the full line flashes for one frame before the animation restarts it.

Evidence

visualCounter reads 'First frame solid: 1 of 1 mounts' on the initial mount, and the full line is drawn.
visualNo change on the idle page between 1.0s and 7.0s. The full line and the 1 of 1 counter stay the same.
visualShortly after the first 'Mount 10 times' click, the counter reads 4 of 4 and the line is mid-animation, drawn only up to Page D.
visualCounter reads 9 of 9 and the line is drawn only up to Page B. The animation progresses, but each mount was still flagged as solid on frame one.
visualThe first batch is complete. Counter reads 11 of 11 and the full line is drawn. Every remount flashed solid.
visualAt the second 'Mount 10 times' click, the counter reads 12 of 12 and the plot area shows axes and grid with no line. This is the correct animation start state, but the counter has already flagged that mount's first frame as solid.
visualCounter reads 17 of 17 and the line is partially drawn to just before Page C.
visualCounter reads 21 of 21 and the line is partially drawn to Page E. All 21 observed mounts flashed solid.
visualThe final state is a fully drawn line, and the counter stays at 21 of 21.
Issue markdown (copy-paste ready)
## Summary
In Recharts 3.11.3 with React 18.3.1, a `Line` with an entrance animation is painted fully solid on its first frame. The draw-in animation starts only after that frame, so the full line flashes for one frame on every mount.

## Environment
- Chromium 151.0.7922.34, macOS, 1280x720, dpr 1
- recharts 3.11.3, react 18.3.1, loaded via esm.sh CDN
- Test page setting: BusyCommit 30 ms

## Steps to reproduce
1. Open the test page 'Recharts 3.11.3 / React 18: Line flash bug' (2.0s).
2. Note the counter 'First frame solid: N of M mounts' after the initial mount (1.0s).
3. Click **Mount 10 times** (7.7s).
4. Wait for the batch to finish (13.0s).
5. Click **Mount 10 times** again (16.5s) and wait (21.0s).

## Expected
The first painted frame of each mount shows no line, or shows the animation start state. The line then draws in from Page A to Page G. The counter reports 0 solid first frames.

## Actual
Every mount is flagged as solid on its first frame:
- 1.0s: `1 of 1 mounts`
- 9.0s: `4 of 4`
- 11.0s: `9 of 9`
- 13.0s: `11 of 11`
- 16.5s: `12 of 12`
- 19.0s: `17 of 17`
- 21.0s: `21 of 21`

The animation itself does run after the first frame. Partial lines are visible at 9.0s (to Page D), 11.0s (to Page B), 19.0s (near Page C) and 21.0s (to Page E). At 16.5s the plot shows an empty start state.

## First bad moment
1.0s: the initial mount is already reported as solid on its first frame.

## Suggested area
Line entrance animation setup. The progress 0 path state seems to be applied after the first paint. This may be a timing issue between the React 18 commit and the animation start, and the page's BusyCommit 30 ms setting may make it easier to see.

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →