You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying using useRef in a Paper.TextInput the rescript throws This has type: React.ref<Js.Nullable.t<'a>> Somewhere wanted: Js.Nullable.t<'b> => unit
How to reproduce
Steps to reproduce:
Define a ref with useRef:
letinputRef=React.useRef(Js.Nullable.null)
Use the ref in a TextInput component:
<Paper.TextInputref=inputRefmode=#outlined
/>
Expected behavior
Expect to compiler compile to use the ref
Actual behavior
The compiler throws: This has type: React.ref<Js.Nullable.t<'a>> Somewhere wanted: Js.Nullable.t<'b> => unit
Activity
MoOx commentedon Oct 15, 2021
ref={inputRef->Ref.value}Bryant-Anjos commentedon Nov 20, 2021
I've try it but still doesn't work. 😢
MoOx commentedon Dec 6, 2021
Maybe paper bindings are not up to date? poke @DCKT
Bryant-Anjos commentedon Dec 7, 2021
@MoOx I was using the latest version of rescript-react-native/paper
MoOx commentedon Dec 8, 2021
I was assuming that the bindings are not up to date with rescript-react-native, not that you were not using the correct version.
MoOx commentedon May 27, 2022
@kevin-klein can you help here as you are a user of this bindings ? Thanks !