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
Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be exposed in the repo:
Activity
cem2ran commentedon Apr 20, 2019
@cknitt mentioned
focusexists inTextInput: https://github.com/reasonml-community/bs-react-native/blob/41d03e6f6eaf1f460eb45ebdd6fa9165853796fb/reason-react-native/src/components/TextInput.re#L276renanmav commentedon May 10, 2020
So what would be the correct solution here?
MoOx commentedon Jun 9, 2020
We should definitely document most common method to use via ref in the doc.
@cem2ran can you confirm that focus can be done via something like
textInputRef ->React.Ref.current ->Js.Nullable.toOption ->Option.map(textInput => textInput->TextInput.focus() ) ->ignore,[-]Refs in reason-react-native[/-][+]Document method to call on refs[/+]