Installation
NPM
There are a number of Curi packages, all of which can be installed using NPM. The only one that every application requires is @curi/router
, which provides the core routing/navigation functionality.
Curi also requires that you create your own history object. There are three packages to choose from: @hickory/browser
, @hickory/hash
, and @hickory/in-memory
. Which package you need depends on the application, but the browser package is best for most websites.
Unpkg
These packages can also be loaded from Unpkg.
Promises
Curi uses Promises, so you may need to include a polyfill to add Promise support for older browsers (including IE 11).
If you need a general ES2015 polyfill, you can check out the one provided by Babel's babel-polyfill package. If you only need a Promise polyfill, es6-promise package or polyfill.io should do the trick.