Reproduction link

Steps to reproduce
In the repro on lines 125, 127, comment out and note that both examples of axis tick customisation work, although the second has a type error.
What is expected?
Documentation here: https://recharts.org/en-US/guide/customize
Tells us that we can customise via a render prop: ie. a function that accepts props and returns jsx:
tick={renderCustomAxisTick}
However, the docs here:
https://recharts.org/en-US/api/XAxis#tick
Don't tell us that a render prop is valid.
tick: Boolean | Object | ReactElementoptional
The example here:
https://recharts.org/en-US/examples/CustomizedLabelLineChart
Shows an actual React Node being passed in.
<XAxis dataKey="name" height={60} tick={<CustomizedAxisTick />} />
What is actually happening?
Both a renderProp and a React.Node appear to be valid methods for customising the tick. The documentation should reflect this.
| Environment |
Info |
| Recharts |
v2.1.6 |
| React |
documentation only |
| System |
documentation only |
| Browser |
documentation only |
I'm a curious how the
<XAxis dataKey="name" height={60} tick={<CustomizedAxisTick />} />
Actually works. You're not passing any props here. I assume you're doing some kind of clone element and passing new props in.
Reproduction link
Steps to reproduce
In the repro on lines 125, 127, comment out and note that both examples of axis tick customisation work, although the second has a type error.
What is expected?
Documentation here: https://recharts.org/en-US/guide/customize
Tells us that we can customise via a render prop: ie. a function that accepts props and returns jsx:
However, the docs here:
https://recharts.org/en-US/api/XAxis#tick
Don't tell us that a render prop is valid.
The example here:
https://recharts.org/en-US/examples/CustomizedLabelLineChart
Shows an actual React Node being passed in.
What is actually happening?
Both a renderProp and a React.Node appear to be valid methods for customising the tick. The documentation should reflect this.
I'm a curious how the
Actually works. You're not passing any props here. I assume you're doing some kind of clone element and passing new props in.