Lets say I am creating a bar chart using Recharts, how would i create a custom component for each of the following Recharts components:

XAxis, YAxis, Tooltip, Legend, CartesianGrid, Cell, and Bar

The reason for this s because i am planning to create a chart with a lot of props and wish to separate all the default props and customization in their own individual component for the list component above.

I have tried just putting the CartesianGrid in a react component and the grid will not show

Any ideas?

0 Answers