react-native-bouncy-checkbox
react-native-bouncy-checkbox copied to clipboard
Enable checkbox by reference doesn't work
Trying to activate the checkbox by reference an error occurs, is informed that the onPress method does not exist.

Did you find a solution?
I will take a look at this today, thank you for reporting this @VitorGabs Sorry for late response tho
Yeah I keep getting same error using expo with JS, could it be a problem with using JS instead of TS?
This is probably an expo issue, I never use expo so I never get the error itself since I use this library all of my real products.
I will try to reproduce it on expo project.
If anyone can share with me a reproducible example, It will save tons of time :)
onPress is no longer a method
What do you mean? What should we use instead of it?
From the source code, I can see that you can still pass onPress as a prop, but you can not invoke onPress on the ref of BouncyCheckbox. I see there is a handleCheck, which you invoke but the bounciness effect will not trigger.
Arent you the maintainer of the package? You should know that already.
You can downgrade to the version that used to support onPress or you can rewrite the logic.
I simply stopped depending on the package
You're totally right @itsramiel @VitorGabs, @KacperHemperek, @PopJoestar,
Complete my bad, while re-writing version 3, I totally forgot about the synthetic onPress with the Release 3.0.6. You can use synthetic onPress now.
For now, this is just a hotfix. It works without any problem but there is no bounce effect. I will make it work when I can spare some time on it :)
You can downgrade to the version that used to support
onPressor you can rewrite the logic.I simply stopped depending on the package
@itsramiel, I am sorry to hear that you stopped using this package. I hope you will try it again and please consider contribute the open source project since it seems that you have enough knowledge to fix this issue and open a PR and it has much more impact than quitting an open source library :)
I try to maintain more than 100+ libraries and from time to time make mistakes and could not spend enough time since I am working on these projects in my free time and without any salary. So, I hope you want to contribute to more projects instead of quitting them :)
Thank you for making the comments to fix the issue :)