Skip to content

Latest commit

 

History

History
106 lines (64 loc) · 3.77 KB

CHANGELOG.md

File metadata and controls

106 lines (64 loc) · 3.77 KB

1.0.0

  • 42
    • Add namespace prefix for reducers and effects automatically
    • Add namespace prefix for dispatch in subscriptions, and put in effects
    • Delete api dva/effects, it's passed to effect as second argument
    • Simplify app.start(), move config to dva()
    • Change subscriptions format to Object, keep the same with effects and reducers
    • Replace assert with invariant and warning
    • Refactor testcase
  • 56 - Remove router match from history, use path-to-regexp instead, example
  • 59 - Add onEffect hook, so we can use plugin like dva-loading
  • 71 - Use handleActions directly to resize dva size by 46K (minified)

Docs: Upgrade to 1.0.0

0.0.16

  • Fix renderProps undefined when redirecting

0.0.15

  • Break Change: rename app.store to app._store
  • Support mobile and react-native (example)
  • More at 37

0.0.14

  • 34 - Support dynamic load

0.0.13

  • Break Change: 32 - Improve subscription, with api break change
  • 33 - Change plugin from singleton to class, so won't break with multiple dva instance

0.0.12

  • 31, Add onReducer hook to support reducer enhancer

0.0.11

  • Fix fetch and router don't work

0.0.10

  • 28, Support plugin with app.use
  • Export api from react-router-redux, so we can use actions like push, go, replace, ...
  • Use whatwg-fetch instead of isomorphic-fetch

0.0.9

  • app.start: Return react component so that can be rendered by ReactDOM

0.0.8

  • 12 - Fix effects can't pass arguments

0.0.7

  • 7 - API Improvement

详见:API 设计

0.0.6

  • Change app.start(elementId) to app.start(domElement)

0.0.5

  • 5 - Prepare umd build before publish, then we can make demo on jsfiddle and jsbin more easily

0.0.4

  • Change router format from jsx element to component function
  • Export render from app.start, so we can apply hmr to routes and components, HMR Example

Why

先说 Router 。之前是这样的:

app.router(
  <Route path="/" component={App} />
);

这有几个问题:

  1. 不支持 Dynamic Routing
  2. 有多个路由配置时,由于 jsx 的限制,必须有一个额外的 element 把它们包含起来。比如:<div><Route path="/a" /><Route path="/b" /></div>
  3. HMR 支持问题。<Router> 不放外面传入会触发 react-router 的 rerender,而 react-router 不允许 rerender

另外,app.start return render 方法纯粹是为了支持 components 和 routes 的 HMR,之后如果找到更好的方法,会去掉。

0.0.3

  • 4 - Extend effects, support takeLatest and takeEvery

0.0.2

  • Add fetch, so we can import fetch from 'dva/fetch'

0.0.1

  • First version