https://github.com/bugs181/react-navigation-hoc
Declarative Higher Order Components for React Navigation
https://github.com/bugs181/react-navigation-hoc
higher-order-component react react-navigation
Last synced: 2 months ago
JSON representation
Declarative Higher Order Components for React Navigation
- Host: GitHub
- URL: https://github.com/bugs181/react-navigation-hoc
- Owner: bugs181
- License: mit
- Created: 2018-11-21T01:05:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-30T15:47:00.000Z (over 7 years ago)
- Last Synced: 2025-10-08T08:54:35.730Z (10 months ago)
- Topics: higher-order-component, react, react-navigation
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-navigation-hoc
Declarative Higher Order Components for React Navigation
Navigator is a set of React components providing a declarative API alternative to [React Navigation](https://reactnavigation.org/en/).
# Install: #
npm install --save react-navigation-hoc
# Example: #
import React from 'react'
import { Navigator, TabBarBottom, Tab, Screen } from 'react-navigation-hoc'
import Hello from './screens/Hello'
import World from './screens/World'
export default class App extends React.Component {
render() {
return (
{ World }
)
}
}
# Features: #
- Declarative style react-navigation
- Navigators use component properties
- Nested Navigators
- Screen component lifecycle methods
- Works for version ~2 and ^3 of react-navigation
# Prerequisites: #
- react-navigation-*
# Available components: #
- \ - Top level component required to initialize children components.
- \ - createBottomTabNavigator
- \ - Helper component
- \ - createStackNavigator
- \ - Wrapper component for your screens. Provides lifecycle methods.