tttstudios / react-native-otp-input

Tiny Javascript library which provides an elegant UI for user to input one time passcode.
MIT License
542 stars 243 forks source link

Clipboard has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/clipboard' instead of 'react-native' #172

Open yahya-alezzi opened 2 years ago

yahya-alezzi commented 2 years ago

Clipboard has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/clipboard' instead of 'react-native'

sharmadevs commented 2 years ago

@yahya-alezzi install cilpboard yarn add @react-native-community/clipboard using this command

yahya-alezzi commented 2 years ago

@sharmadevs I installed the clipboard package but the issue is not resolved. I still see the false alert. I think the problem is that [response-native-otp-input] is using the clipboard from react-native

sharmadevs commented 2 years ago

"react-native": "0.63.3", "@react-native-community/clipboard": "^1.5.1", "@twotalltotems/react-native-otp-input": "^1.3.11",

<OTPInputView
                            style={{ width: '80%', height: 200, alignSelf: "center" }}
                            pinCount={6}
                            autoFocusOnLoad
                            codeInputFieldStyle={styles.underlineStyleBase}
                            codeInputHighlightStyle={styles.underlineStyleHighLighted}
                            onCodeFilled={(code) => {
                                setPin(code)
                            }}
                        />

@yahya-alezzi with these package i am not getting any error it's working like charm

UmarFKhawaja commented 2 years ago

I get the following error when I use those versions. I have also tried using v1.2.2 of the Clipboard.

TypeError: null is not an object (evaluating 'NativeClipboard_1.default.getString')

Any help is appreciated.

coffe0wl commented 2 years ago

I get the following error when I use those versions. I have also tried using v1.2.2 of the Clipboard.

TypeError: null is not an object (evaluating 'NativeClipboard_1.default.getString')

Any help is appreciated.

You have to return to 1.3.7 version (You can also test other versions)

simran7575 commented 2 years ago

Clipboard has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/clipboard' instead of 'react-native'

Any solution to this?

Klytoc commented 2 years ago

any solution to this??

Villa2311 commented 1 year ago

Try this

1: install yarn add @twotalltotems/react-native-otp-input@1.3.7

2: install yarn add @react-native-community/clipboard

3: Run expo start -c to clear the cache

ser-emejia commented 1 year ago

Any solution? I'm ussing expo

ShivamMetricoid commented 7 months ago

Facing similar issue i am using expo

ser-emejia commented 7 months ago

Facing similar issue i am using expo

I endend using this