-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 0.3.0 - 2017-02-13 | ||
|
||
**BREAKING CHANGES** | ||
- `createCycleMiddleware()` no longer takes any arguments. Instead you need to call `Cycle.run` yourself (which can be installed via `npm i -s @cycle/xstream-run`) passing it your `main` function and `drivers` explicitly: | ||
|
||
```diff | ||
+import {run} from '@cycle/xstream-run'; | ||
|
||
-const cycleMiddleware = createCycleMiddleware(main, drivers); | ||
+const cycleMiddleware = createCycleMiddleware(); | ||
+const { makeActionDriver, makeStateDriver } = cycleMiddleware; | ||
|
||
const store = createStore( | ||
rootReducer, | ||
applyMiddleware(cycleMiddleware) | ||
); | ||
|
||
+run(main, { | ||
+ ACTION: makeActionDriver(), | ||
+ STATE: makeStateDriver() | ||
+}) | ||
``` | ||
|
||
`createCycleMiddleware()` apart from returning the middleware function, also has two function properties attached to it; namely the `makeActionDriver()` and the `makeStateDriver()` which you can use accordingly when you call `Cycle.run`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters