Pressable with child function and interaction states by Freddy03h · Pull Request #735 · rescript-react-native/rescript-react-native

Update <Pressable> binding with use of function with interactionState param for children and style props.

It's a breaking change with the current binding but I think it's better than having an <PressableWithChildFunction> or something like that.
Because the point of using Pressable component is to use those fine interaction states (pressed on react-native, with the addition of hovered and focused on react-native-web) for building a component.

If the developper don't want them he still can use Touchable components or simply
<Pressable> {_ => <Text/> }</Pressable>

hovered and focused are Option because they don't exist (yet?) in react-native, so if you want to create a component that work on both react-native and react-native-web envs, it's better to check values like this
hoverd->Option.getWithDefault(false)
But if you have a better idea to handle this, I would like to know it!