alantoa / react-native-awesome-slider

🚀 An anwesome <Slider/> that supports various features haptic, lottie, animation, ballon, etc.
MIT License
228 stars 28 forks source link

React not defined #61

Closed MathiasSvDK closed 4 months ago

MathiasSvDK commented 4 months ago

When using web React is not defined in lib/module/ballon.js. You use the function React but its not imported at line 1.

Its: import { forwardRef, useImperativeHandle, useRef, memo } from 'react';

But should be: import React, { forwardRef, useImperativeHandle, useRef, memo } from 'react';

alantoa commented 4 months ago

Hey @MathiasSvDK, It seems like this is related to your TypeScript issue. Could you please check if it's connected to your project setup?

MathiasSvDK commented 4 months ago

I dont have typescript on it. My buddy has a typescript project tho and it doesnt work for him either

MathiasSvDK commented 4 months ago

We both fixed it by adding it tho

alantoa commented 4 months ago

got it, i just added React on that file in v2.5.1, let's see if it fixed your issue.

MathiasSvDK commented 4 months ago

Works now for both of us without having to modify it. Update worked.