npm history 5.0.0
v5.0.0

latest releases: 5.3.0, 5.3.0-pre.0, 5.2.0...
3 years ago

Today we are very pleased to announce the stable release of history version 5!

Overview

This version includes many enhancements and fixes a few important issues with the library.

New Features

  • Hash history now has support for location.state
  • Better history.block API, with support for retrying transitions
  • Full TypeScript declarations and IntelliSense docs
  • Adds development and production builds for <script type=module> users
  • Both browser and hash history have support for iframes (custom window objects)
  • About 50% smaller than v4 (and no dependencies)

Bugfixes

  • Fixed some long-standing encoding issues with location.pathname
  • Removed unfixable warnings about pushing the same path in hash history
  • Renamed browser global to HistoryLibrary so it doesn't conflict with window.History

Breaking Changes

  • Removed support for browsers that do not support the HTML5 history API (no pushState)
  • Removed relative pathname support in hash history and memory history
  • Removed getUserConfirmation, keyLength, and hashType APIs

Usage

Please refer to our installation guide for instructions about how to install the library.

There is also a getting started guide as well as a complete API reference in the docs folder.

We are very excited about this release, especially because it will serve as the foundation for the upcoming release of React Router version 6.

Thank you for your support. Enjoy! 😀

Don't miss a new history release

NewReleases is sending notifications on new releases.