Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

navigation-react-mobile

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

navigation-react-mobile

React Mobile plugin for the Navigation router

  • 3.10.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Hello World

import { StateNavigator } from 'navigation';
import { NavigationHandler, NavigationLink, NavigationBackLink } from 'navigation-react';
import { NavigationMotion, Scene } from 'navigation-react-mobile';

const stateNavigator = new Navigation.StateNavigator([
  { key: 'hello', route: '' },
  { key: 'world', trackCrumbTrail: true }
]);

stateNavigator.start();

const Hello = () => (
  <NavigationLink stateKey="world">
    Hello
  </NavigationLink>
);

const World = () => (
  <NavigationBackLink distance={1}>
    World
  </NavigationBackLink>
);

const App = () => (
  <NavigationHandler stateNavigator={stateNavigator}>
    <NavigationMotion
      unmountedStyle={{ translate: 100 }}
      mountedStyle={{ translate: 0 }}
      crumbStyle={{ translate: -10 }}
      renderMotion={(style, scene, key) => (
        <div
          key={key}
          style={{ transform: `translate(${style.translate}%)` }}>
          {scene}
        </div>
      )}>
      <Scene stateKey="hello"><Hello /></Scene>
      <Scene stateKey="world"><World /></Scene>
    </NavigationMotion>
  </NavigationHandler>
);

Keywords

FAQs

Package last updated on 25 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc