Socket
Socket
Sign inDemoInstall

react-navigate

Package Overview
Dependencies
15
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-navigate

Navigation on web for React.JS


Version published
Maintainers
1
Install size
33.0 kB
Created

Readme

Source

dependencies Status js-standard-style

react-navigate

Navigation on web for React.JS https://xiaody.github.io/react-navigate

Installation

To install the stable version:

npm install --save react-navigate

Usage

import Navigation, {NavLink} from 'react-navigate'
import 'react-navigate/src/Navigation.css'

const views = {
  home: {
    name: 'home',
    title: 'Home page',
    content () {
      return (
        <NavLink to='about'>go to About</NavLink>
      )
    }
  },
  about: {
    name: 'about',
    title: 'Abount',
    content: 'Oh!'
  }
}

<Navigation
  viewsMap={views}
  defaultViewName='home'
/>

Options

  • props.viewsMap
  • props.defaultViewName
  • props.height
  • props.headerHeight
  • props.backButton
  • props.className
  • props.titleClassName
  • props.bodyClassName
  • props.onWillNav
  • props.onDidNav

Limitations

  • scroll position isn't kept when switching between views, because the DOM is destroyed and re-created
  • no back button title support
  • require modern browsers env

License

MIT

Keywords

FAQs

Last updated on 14 Oct 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc