alauda

2.7.0 • Public • Published

alauda NPM version

tools for webapps

Dependency Status Dependency ci Status

Install

npm install --save alauda

Usage

History

import { on, start, navigate } from 'alauda/history';
 
start(); // start listening for history changes
 
// listen for history changes
on('redirect', function(url) {
    console.log(url);
});
 
// example with ga
on('changed', function(url) {
    _gaq.push(['_trackPageview', url]);
})
 
navigate('/'); // indicate to the browser to change url
navigate('/', true); // indicate to the browser to change url by replacing the current one

Web app

Use history to navigate and redirect

import { init, redirect } from 'alauda/web-app';
 
init((url) => {
    console.log(url);
});
 
redirect('/'); // manually ask for a redirect of url

Readme

Keywords

Package Sidebar

Install

npm i alauda

Weekly Downloads

11

Version

2.7.0

License

ISC

Last publish

Collaborators

  • churpeau