Skip to content

The packaging

Pre-release
Pre-release
Compare
Choose a tag to compare
@pshrmn pshrmn released this 26 Apr 22:33
· 1455 commits to master since this release

curi-react, et al.

curi-react has been split up into a number of smaller packages. If you want all of the React web components, you can install curi-react. However, if you only want the <Navigator> and <Link>, you may just want to install curi-react-navigator and curi-react-link.

UMD

A UMD example has been added to the curi-experiments package.

Also, UMD builds have been switched to Rollup. These builds are now slightly smaller. There is a little bit of work to do in optimizing these because there are some duplicate helpers, but the releases are still quite small. react-dom makes up the vast majority (over two-thirds) of the script download size.

file dependency of size
curi.min.js n/a 7.99kB
curi-react.min.js n/a 7.46kB
15.45kB
history.min.js curi 14.9kB
prop-types.min.js curi-react 2.42kB
32.77kB
react.min.js curi-react 21.3kB
react-dom.min.js react 129kB
183.07kB

Todo: Test Curi with Preact?

curi

The curi package has had two changes:

  1. Response objects now have a key. For browser/memory histories, this will be the same as the location's key. For hash histories, it will be a randomly generated 6 character alphanumeric string.

  2. You can now provide a cache option to createConfig. The cache allows you to re-use responses to the same location. Implementations can vary, but the cache must have get and set methods. get receives the current location and returns the cached response for the location (if one exists). set receives a response object, which the cache should store (using response.location to identify the location).