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

And We Back (with Type Fixes)!

01 Oct 04:45
Compare
Choose a tag to compare

This release introduces two fixes to our TypeScript definitions.

Full Changelog

Changes:

  • Merged #289 by @Viniter – correction to types for history dependency.
  • Merged #295 by @hisuwh – make pathname parameter optional in HistoryLocation interface.

Fix All the Things and All the Types

12 May 22:09
Compare
Choose a tag to compare

This release introduces several updates to our TypeScript and FlowTyped definitions. TypeScript users should update their package.json to v15.1.1.

Full Changelog

Changes:

You Want (TypeScript) Types, You Got 'Em

23 Mar 00:01
Compare
Choose a tag to compare

This release adds TypeScript definitions that ship directly with the library.

Full Changelog

Changes:

  • Add index.d.ts at the root level of the repository.
  • Nuke package-lock.json and insist on yarn.
  • Add CONTRIBUTING section to README.md.

Shake Your Money Maker

05 Feb 20:43
Compare
Choose a tag to compare

This release moves immutable wrappers to a separate re-export index and adds support for better webpack4+ tree shaking.

Full Changelog

Changes:

  • BREAKING CHANGE: Move immutable* re-exports from index.js to immutable/index.js compatibility #267
  • Add package.json:sideEffects: false so webpack4+ can tree shake ESM much better.

Never Change

31 Jan 00:06
Compare
Choose a tag to compare

This release brings immutable support, Flow types, navigation confirmation, es builds, and more!

Full Changelog

Implemented enhancements:

Fixed bugs:

  • URI Encoding/Decoding #146
  • Handle url paths with trailing slash #256 (bion)
  • Add missing significant 'no' word in docs #243 (kinware)

Ima fix `Fragment`

02 Jul 21:34
Compare
Choose a tag to compare

This release focuses on improving Fragment. We fixed a bunch of rendering bugs, removed <RouterProvider>, and added 404 fragments!

Breaking

  • Remove <RouterProvider>. bff8788
  • The middleware now emits navigation events like PUSH and REPLACE in addition to LOCATION_CHANGED. You should still depend on LOCATION_CHANGED to know when the navigation actually happens.

Added

  • Added "404" routes with a forNoMatch prop on Fragment
  • Swap in builder with more concurrency + other tweaks. Thanks @ryan-roemer ! 36d38d0
  • Add hash router (#173) (thanks @Stuk !) (resolved #102)
  • We use Prettier now!

Fixed

Breaking Changes Are Hard to Do

23 Mar 17:38
Compare
Choose a tag to compare

Breaking

  • The library no longer enhances the reducer. Instead, a factory function returns the prepared middleware, enhancer, and reducer. This is to allow for easier compatibility with special reducer types in the ecosystem (e.g. immutable and redux-loop). See the new instructions for setting up the Redux boilerplate.
  • Removed <AbsoluteFragment> and made <RelativeFragment> the default export for <Fragment>.
  • <Fragment> no longer wraps children in an extraneous <div>. This requires <Fragment> to accept only single children.

Minor

  • Added action creators for navigation to the official API. Resolves #99.
  • Flow definitions enhanced for accuracy.

Patch

  • Resolved #121, #127, #129.
  • Strip the basename from the initial pathname.

Don't Worry, Be Hapi

19 Oct 23:26
Compare
Choose a tag to compare

Minor

Added support for server rendering with Hapi! (#109, #110)

Revenge of the Middleware

07 Oct 20:25
Compare
Choose a tag to compare

Breaking

  • Reintroduce the router middleware to allow for dispatching router actions within consumer middleware (#96)
  • Fix a query string bug in <Link href>s (#100). Thanks @aweary !!

Better store enhancer APIs

28 Sep 04:01
Compare
Choose a tag to compare

We've overhauled the store enhancer API to require less fiddly and error-prone configuration!

On the browser:

// Install the router into the store for a browser-only environment
const clientOnlyStore = createStore(
  yourReducer,
  initialState,
  routerForBrowser({
    // The configured routes. Required.
    routes,
    // The basename for all routes. Optional.
    basename: '/example'
  })
);

For an Express route:

app.use('/*', (req, res) => {
  // Create the Redux store, passing in the
  // Express request to the store enhancer.
  // 
  // If you're using an Express sub-router,
  // routerForExpress will infer the basename
  // from req.baseUrl!
  const store = createStore(
    state => state,
    { what: 'ever' },
    routerForExpress({
      routes,
      request: req
    })
  );

  // ...then renderToString() your components as usual,
  // passing your new store to your <Provider> component.
  // 
  // Don't forget to attach your ESCAPED initialState to
  // a script tag in your template that attaches to
  // something like window.__INITIAL_STATE.
});

Major

New browser and Express store enhancer APIs with updated docs (#73)