douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
971 stars 59 forks source link

Not working for "react-native": "0.57.3" #38

Closed munsifhayat closed 5 years ago

munsifhayat commented 5 years ago

I have used for RN 0.53.0 or later use react-native-keyboard-manager@latest But it's not working as expected. I am getting this error while declaring :

import KeyboardManager from 'react-native-keyboard-manager';

'KeyboardManager' is declared but its value is never read.ts(6133) Could not find a declaration file for module 'react-native-keyboard-manager'. '/Users/mac/Development/My Masjid/MyMasjid/node_modules/react-native-keyboard-manager/index.js' implicitly has an 'any' type. Try npm install @types/react-native-keyboard-manager if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-keyboard-manager';

douglasjunior commented 5 years ago

Hi, the sample project is using the RN 0.56.0. Take a look: https://github.com/douglasjunior/react-native-keyboard-manager/tree/master/Sample

If you are using cocoapods: https://github.com/douglasjunior/react-native-keyboard-manager/tree/master/SamplePod

munsifhayat commented 5 years ago

I have looked into that. but I don't understand its giving me the above error on declaration. I also tried this Try npm install @types/react-native-keyboard-manager. but no luck. In your sample project its using 'index.ios.js' while in 0.57 we have just one file for both. It's giving error on deflation.

douglasjunior commented 5 years ago

There is probably some other configuration problem with your project.

About index.ios.js, do not worry about file extension. See how they work https://facebook.github.io/react-native/docs/platform-specific-code

munsifhayat commented 5 years ago

I have solved this issue by using cocoa-pods. Its working perfectly fine. the following link may be useful in case any problem occurs

https://stackoverflow.com/questions/50805753/duplicate-module-name-react-native/51372213#51372213