bs-react-navigation icon indicating copy to clipboard operation
bs-react-navigation copied to clipboard

createBottomTabContainer + similar returning ReasonReact.reactElement seems to be incorrect

Open lewisf opened this issue 6 years ago • 1 comments

These seem to be ReasonReact.reactClass? I'm having a hard time using bottom tab navigator into JSX for instance.

This doesn't work

<View>
  <BottomTabNavigator />
</View>

nor does this

<View>
  BottomTabNavigator
</View>

lewisf avatar Dec 28 '18 06:12 lewisf

For the record, I got this working by changing ReasonReact.reactElement as a return type to ReasonReact.reactClass

and then changing my usage of the Tab module (resulting from TabNavigator.create) to

let make = children =>
  ReasonReact.wrapJsForReason(
    ~reactClass=Tabs.render,
    ~props=Js.Obj.empty(),
    children,
  );

lewisf avatar Dec 28 '18 06:12 lewisf