Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release [email protected] #403

Merged
merged 1 commit into from
Mar 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/fluxible-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## 1.0.0-alpha.1

### Breaking Changes

See the [upgrade guide](UPGRADE.md#04x-to-1x)

* Default `activeClass` prop has been removed
* `route` object no longer contains `navigate` key. `navigate` can be accessed via `routeStore.getCurrentNavigate()`
* `NAVIGATE_SUCCESS` and `NAVIGATE_FAILURE` payloads are now the `navigate` object which contains a `route` key to
access the current route.

### Features

* Performance improvements:
** `NavLink` will only listen to the `RouteStore` if an `active*` property is used.
** `NavLink` will no longer compute active state on all prop/state changes, only when `currentRoute` or `prop` has
changed.
* [#397] NavLink now supports query parameters via the `queryParams` property

## 0.4.11

### Features
Expand Down
33 changes: 33 additions & 0 deletions packages/fluxible-router/UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Upgrade Guide

## 0.4.x to 1.x

### NavLink's default `activeClass` prop value removed

Previously all `NavLink`s listened the `RouteStore` for changes in order to update their active style/class/element.
In many cases none of these properties were used, which meant the component was listening unnecessarily. Now
`NavLink` will only listen if `activeClass`, `activeStyle`, or `activeElement` are explicitly passed in to the
component.

Code that relied on the `active` class to be automatically added to `NavLink` components will be required to
explicitly use `<NavLink activeClass='active'>` in order for the link to listen for updates.

### `route.navigate` no longer exists

Code that relied on `route.navigate` will need to access the `navigate` object from `RouteStore.getCurrentNavigate()`
. The ownership of these two objects have been inverted to reflect that a navigation results in a route being matched
rather than the inverse. This allows us to optimize `NavLink` by making `navigate` and `route` immutable and
recognize that a `navigate` may be triggered, but the `route` doesn't necessarily change.

### `NAVIGATE_SUCCESS` and `NAVIGATE_FAILURE` payload changes

Stores that listen to `NAVIGATE_SUCCESS` and `NAVIGATE_FAILURE` will receive a different payload. These payloads have
been unified across the events. This allows the `RouteStore` to correlate the events with `NAVIGATE_START` using a
transaction identifier with the changes to the `route` object.

#### `NAVIGATE_SUCCESS`

Previously received the `route` object, but now receives the `navigate` object which contains `navigate.route`.

#### `NAVIGATE_FAILURE`

Previously received an `error` object, but now receives the `navigate` object which contains `navigate.error`.

## 0.3.x to 0.4.x

The `RouteStore`s `currentRoute` is no longer an immutable.js object.
Expand Down