Skip to content

Instantly share code, notes, and snippets.

@hew
Last active Apr 2, 2019
Embed
What would you like to do?
Nested bs-react-navigation

nested bs-react-navigation

module CreateTeamStack =
StackNavigatorWeb.Create({
open StackNavigatorWeb;
open CreateTeamRoutes;
type route = CreateTeamRoutes.t;
let initialRoute = Choice;
let getScreen = (route, navigation) =>
switch (route) {
| Choice => (
<CreateTeamScreen navigation />,
screenOptions(~title="Beep", ()),
)
};
});
let router = CreateTeamStack.render;
import React from 'react';
import { router as createTeamNav } from '../navs/CreateTeamNav';
export const createTeam = () => (
React.createElement(createTeamNav, {}, null)
)
// export const otherNav () => ()
[@bs.module "../interop/nav-element-to-component.js"]
external createTeamRouter: ReasonReact.reactClass = "createTeam";
module CreateTeam = {
let make = ((), _) =>
ReasonReact.wrapJsForReason(
~reactClass=createTeamRouter,
~props=None
);
};
/*
[@bs.module "../interop/nav-element-to-component.js"]
external otherRouter: ReasonReact.reactClass = "otherNav";
*/
/*
module OtherNav = {
let make = ((), _) =>
ReasonReact.wrapJsForReason(
~reactClass=otherRouter,
~props=None
);
};
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment