router5-transition-path
TypeScript icon, indicating that this package has built-in type declarations

8.0.1 • Public • Published

transition-path

Router5 helper to determine a transition path.

Installation

npm install --save router5-transition-path

Usage

This module exports a transitionPath function which can compute the transition path between two router5 states: segments to deactivate, segments to activate and intersection node between the two.

It also exports (as named exports) a nameToIDs function for transforming a route name to a list of segments.

import transitionPath from 'router5-transition-path';
 
const { toActivate, toDeactivate, intersection } = transitionPath(toState, fromState);

ES5

var transitionPath = require('router5-transition-path').default;

See the tests for examples.

Readme

Keywords

Package Sidebar

Install

npm i router5-transition-path

Weekly Downloads

25,969

Version

8.0.1

License

MIT

Unpacked Size

13.4 kB

Total Files

8

Last publish

Collaborators

  • troch