Skip to content

Latest commit

 

History

History
83 lines (65 loc) · 2.26 KB

CHANGELOG.md

File metadata and controls

83 lines (65 loc) · 2.26 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to [Semantic Versioning(http://semver.org/spec/v2.0.0.html).

[1.0.0-alpha.0] - 2018-04-07

Added

  • Support for TypeScript. See notes
  • Support for multiple stores. See api docs

Changed

  • plugin API has changed to avoid using init. Shared dependencies are accessed with this. See the plugins API
  • as a result of plugin API changes, v1.0.0-alpha.0 requires updating all plugins
  • imported global dispatch now fires into all stores
  • imported global getState now gets state from all stores. Note: init({ name }) will be used as the store.name, otherwise it defaults to the index.

[0.6.0] - 2018-03-27

Changed

Effects now dispatch actions that can be seen in the devtools.

[0.5.3] - 2018-03-05

Added

Support for devtool action creators. See #281.

[0.5.0] - 2018-03-05

Added

  • listen to actions from other models within your reducers
const count2 = {
  state: 0,
  reducers: {
    // listens for action from other reducer
    'count1/increment': (state) => state + 1
  }
}

Note: not yet available for effects.

Deprecated

  • getState from core in 0.4.0 will be altered with v1.0.0.

[0.4.0] - 2018-02-18

Added

  • export getState from core. See example below:
import { getState } from '@rematch/core'

const state = getState()
  • dispatch meta parameter - an optional second dispatch param that can be used to pass "meta" information
dispatch.example.update(payload, { syncWithServer: true })
// is equal to:
// dispatch({ type: 'example/update', payload, meta: { syncWithServer} })

Meta can be accessed as the third param from reducers and effects.

const model = {
  state: 0,
  reducers: {
    someReducer: (state, payload, meta) {
      // see meta as third param
    }
  }
}

[0.3.0] - 2018-02-10

Added

  • a dispatch will return a value as a Promise

[0.2.0] - 2018-02-03

Added

  • Overwrite store.dispatch with rematch dispatch. No more need for importing dispatch when using "react-redux".