Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6213

toggle-switch-react-native for typescript

$
0
0

I want to use the toggle-switch-react-native component in my Typescript app. I tried installing it like this:

yarn add toggle-switch-react-native --save
@types/toggle-switch-react-native

However, I still get an error that:

Could not find a declaration file for module 'toggle-switch-react-native'. '/Users/grannyandsmith/insta/app/node_modules/toggle-switch-react-native/ToggleSwitch.js' implicitly has an 'any' type.  Try `npm install @types/toggle-switch-react-native` if it exists or add a new declaration (.d.ts) file containing `declare module 'toggle-switch-react-native';`

How can I define its types? Is there an alternate? Am I installing it correctly?


Viewing all articles
Browse latest Browse all 6213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>