Typescript error on <gridHelper colorCenterLine

Hi,
I got this error on <gridHelper colorCenterLine

Type '{ colorCenterLine: number[]; colorGrid: number[]; }' is not assignable to type 'GridHelperProps'.
  Property 'colorCenterLine' does not exist on type 'GridHelperProps'.ts(2322)

What’s the problem ? Thanks

The color is set in the constructor.

so, use args

<gridHelper args={[10, 10, 0xff0000]} />

Example,

Thank you. How do I know how to add colorGrid in args ? I mean where to look in the code or in the documentation ?

The clue is in the error.

You can then look at the official docs about the THREE.GridHelper and see that it doesn’t have a direct method or property for colorCenterLine, but it does have a way to set it in the constructor.

And since your are using R3F, you can see how to use constructor arguments on the R3F Pmnds docs.

I demonstrate lots of problem solving techniques like this on my R3F course.
Here is a discount coupon.
Offer expires in 5 days. Happy New Year.