Skip to content

Instantly share code, notes, and snippets.

@hew
Last active April 2, 2019 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hew/8ea2fb13acf96547652acf2c7d99a1fa to your computer and use it in GitHub Desktop.
Save hew/8ea2fb13acf96547652acf2c7d99a1fa to your computer and use it in GitHub Desktop.
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