Intermediate
One axis, even in StrictMode
This component draws a D3 axis in an effect, and the page runs it in StrictMode, so the effect runs twice. Today two axes are drawn on top of each other.
Fix the effect so there is exactly one axis line and 5 ticks.
What Check tests
- Exactly one axis line
- Exactly 5 tick marks
- The effect cleans up
- No attribute holds NaN
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.