An open API service indexing awesome lists of open source software.

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

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.