react-router
Version:
A complete routing library for React.js
25 lines (19 loc) • 487 B
JavaScript
import NavigationTypes from './NavigationTypes';
/**
* A Location answers two important questions:
*
* 1. Where am I?
* 2. How did I get here?
*/
class Location {
static isLocation(object) {
return object instanceof Location;
}
constructor(pathname='/', query=null, state=null, navigationType=NavigationTypes.POP) {
this.pathname = pathname;
this.query = query;
this.state = state;
this.navigationType = navigationType;
}
}
export default Location;