type state = {
myListRef: ref(option(ReasonReact.reactRef)),
};
let setListRef = (theRef, {ReasonReact.state}) =>
state.myListRef := Js.Nullable.toOption(theRef);
let make = (~goBack: unit => unit, ~showLogin: unit => unit, _children) => {
...component,
initialState: () => {
myListRef: ref(None),
},
render: (self) => {
<FlatList
ref=(self.handle(setListRef))
/>
}
}