1.0.0-alpha.0 • Published 5 years ago

@history-navigation/react-history v1.0.0-alpha.0

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

@history-navigation/react-history

Hooks to easily integrate with react with history module for transition animations when navigating back and forward

Install

$ npm i @history-navigation/react-history
$ yarn add @history-navigation/react-history

API

Table of contents

class RoutingNavigation

ParameterTypeDescription
props.historyHistorybrowser history instance from history npm module
props.chilrenfuncChildren function

Returns: jsx


function useRoutingNavigation

ParameterTypeDescription
historyHistorybrowser history instance from history npm module

Returns: Movement — The movement state

Examples

const { wasForward, wasBackward, steps } = useRoutingNavigation(history);