callstackincubator / bs-react-navigation

A fast, declarative navigation for React Native, based on React Navigation
MIT License
55 stars 5 forks source link

createBottomTabContainer + similar returning ReasonReact.reactElement seems to be incorrect #17

Open lewisf opened 5 years ago

lewisf commented 5 years ago

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 commented 5 years ago

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,
  );