stackbuilders / react-native-spotlight-tour

A highly customizable tour feature with an awesome spotlight effect
https://stackbuilders.github.io/react-native-spotlight-tour/
MIT License
237 stars 27 forks source link

React is not defined #109

Closed pottercomuneo closed 1 year ago

pottercomuneo commented 1 year ago

Hello! I'm facing this issue, I'm using the library for the first time: Screenshot_1692808807 Actually before this issue I had similar errors which disappeared by adding import React from "react" to these files: node_modules/@stackbuilders/react-native-spotlight-tour/src/lib/SpotlightTour.provider.tsx node_modules/@stackbuilders/react-native-spotlight-tour/src/lib/components/attach-step/AttachStep.component.tsx node_modules/@stackbuilders/react-native-spotlight-tour/src/lib/components/tour-overlay/TourOverlay.component.tsx But now I'm blocked. What is happening? Thanks!

heenatigerhall commented 1 year ago

I am also facing the same issue If you find any solution please let me know @pottercomuneo

pottercomuneo commented 1 year ago

I am also facing the same issue If you find any solution please let me know @pottercomuneo

No solution so far, for the need to go on we had to drastically change that part of our app

JoseLion commented 1 year ago

Hi @pottercomuneo, thanks for the report. The problem was that we were using jsx: react-jsx in our tsconfig.json. This was solved by #92, but it still needs to be released. We'll be doing a major release around this and the next week, so I'll keep you posted.

PS: A workaround for now could be to use jsx: react-jsx in the compile options of your tsconfig.json so both settings match.

pottercomuneo commented 1 year ago

Hi @JoseLion I had seen what was there in #92 but still wasn't working, but as I said it's too late for me since we needed an immediate solution so we totally changed our project (we just display a list of still images now) Thanks, I hope this issue will be useful for other users!

JoseLion commented 1 year ago

This has been fixed and available since v3.0.0 release.