Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 729 Bytes

File metadata and controls

38 lines (30 loc) · 729 Bytes

react-native-app-helpers/TabRouteTable

A table which maps route keys to React components.

Usage

import type { TabRouteTable } from "react-native-app-helpers";

type RouteKey = `routeAKey` | `routeBKey` | `routeCKey`;

type OtherProps = {
  otherPropKey: `Other Prop Value`,
};

const route: TabRouteTable<RouteKey, OtherProps> = {
  routeAKey: ({
    route,
    otherPropKey,
  }) => <React.Fragment>
    {/* Your view goes here. */}
  </React.Fragment>,

  routeBKey: ({
    route,
    otherPropKey,
  }) => <React.Fragment>
    {/* Your view goes here. */}
  </React.Fragment>,

  routeCKey: ({
    route,
    otherPropKey,
  }) => <React.Fragment>
    {/* Your view goes here. */}
  </React.Fragment>,
};