avishain / react-native-range-slider-expo

Customizable range slider for react native apps
MIT License
29 stars 12 forks source link

[typescript] SliderProps are not compatible with JSX.IntrinsicAttributes #32

Open am0ka opened 1 year ago

am0ka commented 1 year ago

When I used RangeSlider in my project, I have encountered with such an error:

Property 'min' does not exist on type 'IntrinsicAttributes'

To resolve it, I found out that in src/RangeSlider.tsx when you export the module, you don't specify type for gestureHandlerRootHOC function, rather using generic version. So solution is:

export default gestureHandlerRootHOC<SliderProps & JSX.IntrinsicAttributes>(RangeSlider);
carlosriveroib commented 1 year ago

Same here