0.6.0 • Published 7 years ago

react-navigate v0.6.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

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

0.6.0

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago