Closed omniviewsports closed 2 years ago
Hello @omniviewsports Thank you for using the library :)
Actually I cannot even see the usage of react-native-bouncy-checkbox
in the example code. Do I miss anything?
@WrathChaos (sorry, for some reason that part did not paste - here is the code).
@omniviewsports I am sorry but I will not download this file because of security reasons :)
@WrathChaos for some reason, when I paste the source code, the BouncyCheckBox component does not show up. Accordingly, the parameters I pass to the component are
The component is wrapped by a View and followed by a text component that recites the EULA agreement.
Hmm, I guess I got it why you're having this error. It is because react-native-bouncy-checkbox
has its own check state system built-in.
You want to control it with useToggle
hook. So you need to use disableBuiltInState
props to control your own whole check system for the checkbox button :)
Please check this doc part: https://github.com/WrathChaos/react-native-bouncy-checkbox#synthetic-press-functionality-with-manual-check-state
You will see how to use it. Also, there is a separated example for this one either.
@omniviewsports
@WrathChaos
I have a login screen (see below for source code) where I am disabling a login button until the user accepts a EULA agreement by clicking the checkbox. The code works, but I get the following TS error:
Type 'boolean | (() => void)' is not assignable to type '((checked: boolean) => void) | undefined'. Type 'boolean' is not assignable to type '(checked: boolean) => void'.
Any advice on how I can fix this?