Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Releases: FormidableLabs/redux-little-router

Bug Busting 5: This Time It's Personal

18 Sep 02:56
Compare
Choose a tag to compare

Patch

Fix undefined previous router state (#70)

Live Free or Bug Hard

18 Sep 02:53
Compare
Choose a tag to compare

Patch

Fix duplicate reducer call #66

Nested Fragments and Nested Routes!

11 Sep 06:46
Compare
Choose a tag to compare

Minor

(#59) Nested route definitions and nested route support! See the section on fragments in the new docs: https://github.com/FormidableLabs/redux-little-router#fragment
(#57) Add a basic client-side demo!

Tiny Breaking Change!

Reverted #49 to support multiple children in Fragments again. Sorry about that!

A Little Bit of Polish

30 Aug 17:57
Compare
Choose a tag to compare

Minor

Automatically connect() in RouterProvider to subscribe to state updates (#46)
Add explicit onClick handler prop (#50)
Properly handle defaultPrevented attribute on the <Link> click event (#51)

TINY BREAKING CHANGE!

Return unwrapped children from Fragment. (#49)

Bug Busting 3: The Threequel

26 Aug 23:07
Compare
Choose a tag to compare

Ensure <Fragment> returns null if it can't match any routes (#43)

  • Throw when routes are empty or malformed (#45)

New <RouterProvider> Component

15 Aug 06:19
Compare
Choose a tag to compare

You can now use the plain component<RouterProvider> instead of the provideRouter HoC.

Example:

 import React from 'react';
 import ReactDOM from 'react-dom';
 import { RouterProvider } from 'redux-little-router';
 import YourAppComponent from './';

 import createYourStore from './state';

 ReactDOM.render(
   <RouterProvider store={createYourStore()}>
     <YourComponent />
   </RouterProvider>
   document.getElementById('root');
 )

Bug Busting 2: Electric Boogaloo

12 Aug 03:26
Compare
Choose a tag to compare

Bug Busting

12 Aug 03:25
Compare
Choose a tag to compare

Boilerplate-begone!

09 Aug 21:46
Compare
Choose a tag to compare

We've banished all the boilerplate we could to arrive at a user-friendly, stable API! Goodbye, churn!

Patch

  • Fixed a nasty bug where ignored route precedence and would mistake concrete routes for parameters (e.g. would display for routes like /:wantsparams). Coincidentally, <Fragment> now has full test coverage! 😆

Minor

  • New, more robust test suite with greater coverage!

Breaking changes

  • Removed the middleware! We now wrap dispatch in the store enhancer.
  • The store enhancer now handles initial location state when passed a pathname and/or a query object! Consequently, we renamed initialStateForSSR to initialRouterState and made it private.
  • The library now provides a default history instance and removes the need to provide a custom instance to both the store enhancer and the provider.
  • The enhancer now accepts:
    • a basename option in the enhancer.
    • a forServerRender flag to determine which history instance to use internally (memory or browser).

Major improvements

14 Jul 17:14
Compare
Choose a tag to compare
  • <Link> now respects modifier keys!
  • <Link> now accepts either a string or an object like so:
{
  pathname: '/yo/this/is/a/url',
  query: {
    some: 'stuff'
  }
}
  • <Link> comes in two flavors now: <Link> (old behavior) and <PersistentQueryLink> (persists the previous query string unless the href prop provides one). Since you'll probably just use one or the other, this is a nice pattern:
import { PersistentQueryLink as Link } from 'redux-little-router';
  • Query string support is fixed across the board!
  • Added a util that sets up initial state on a server-side render. This correctly sets up query strings on the initial location dispatch.
  • The history listener now lives in the store enhancer. The middleware no longer lives in the enhancer and must be used separately due to middleware order issues.
  • The store enhancer's reducer enhancer (enhance!!!) now supports redux-loop.
  • The current route info now lives at the top of the router state tree like it always should've (no more router.current). You can still access the previous route on router.previous.
  • New Fragment component that shows or hides children based on active routes (and even conditions of those active routes).
  • New provideRouter adds the router context to a top-level component. This means that <Link> no longer requires you to pass in dispatch and history (THANK GOD).