How to use react-router-native - 10 common examples

To help you get started, we’ve selected a few react-router-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
const Unrouted: React$ComponentType<{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed1: React$ComponentType&lt;{| someProp: string |}&gt; = withRouter(
  Unrouted
);

// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed2: React$ComponentType&lt;{| someProp2: string |}&gt; = withRouter(
  Unrouted2
);
</span></span>
github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
});
const match3: null | Match = matchPath("/the/pathname");

// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
  path: "the/:dynamicId"
});

const Unrouted: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed1: React$ComponentType&lt;{| someProp: string |}&gt; = withRouter(
  Unrouted
);

// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed2: React$ComponentType&lt;{| someProp2: string |}&gt; = withRouter(
  Unrouted2
);
</span></span>
github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
// matchPath
const match: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId",
  exact: true,
  strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");

// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
  path: "the/:dynamicId"
});

const Unrouted: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed1: React$ComponentType&lt;{| someProp: string |}&gt; = withRouter(
  Unrouted
);

// $ExpectError: This error bubbles up from the assignment in Routed2.
const Unrouted2: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string</span>
github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
}}
&gt;
  About
;

// $ExpectError
;

// DeepLinking
;

// AndroidBackButton
;

// matchPath
const match: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId",
  exact: true,
  strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");

// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
  path: "the/:dynamicId"
});
github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
// $ExpectError
;

// DeepLinking
;

// AndroidBackButton
;

// matchPath
const match: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId",
  exact: true,
  strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");

// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
  path: "the/:dynamicId"
});

const Unrouted: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;
</span>
github flow-typed / flow-typed / definitions / npm / react-router-native_v4.x.x / flow_v0.53.x- / test_react-router-native.js View on Github external
// DeepLinking
;

// AndroidBackButton
;

// matchPath
const match: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId",
  exact: true,
  strict: false
});
const match2: null | Match = matchPath("/the/pathname", {
  path: "/the/:dynamicId"
});
const match3: null | Match = matchPath("/the/pathname");

// $ExpectError
matchPath();
// $ExpectError
const matchError: string = matchPath("/the/pathname", {
  path: "the/:dynamicId"
});

const Unrouted: React$ComponentType&lt;{|
  ...ContextRouter,
  someProp: string
|}&gt; = () =&gt; <span>;

const Routed1: React$ComponentType&lt;{| someProp: string |}&gt; = withRouter(
  Unrouted
);</span>
github shanhuiyang / TypeScript-MERN-Starter / client / src / Common / HeaderWithBack.tsx View on Github external
{
                            this.props.rightTextId ?
                             :
                            
                        }
                    
                 :
                {/* nothing but counterbalance */}
            }
        ;
    }
}

export default withRouter(HeaderWithBack);
github spacemeshos / app / src / utils / routing / index.android.tsx View on Github external
// Android Router

import * as Routing from 'react-router-native';
export default Routing;
export const Router = Routing.NativeRouter;
github spacemeshos / app / src / utils / routing / index.ios.tsx View on Github external
// iOS Router

import * as Routing from 'react-router-native';
export default Routing;
export const Router = Routing.NativeRouter;
github 7kfpun / FinanceMacOSReactNative / app / views / add / elements / stock-cell.js View on Github external
onPressAdd(symbol) {
    console.log('_onPressAdd', symbol);
    this.props.listStore.addItem(symbol);
    nativeHistory.goBack();
  }

react-router-native

Declarative routing for React Native applications

MIT
Latest version published 1 day ago

Package Health Score

95 / 100
Full package analysis