9.0.0 • Published 2 years ago

@riogz/router5-transition-path v9.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

9.0.0

2 years ago

9.0.0-alpha.1

2 years ago

8.1.3

2 years ago