Releases: reactive-react/xreact
Releases · reactive-react/xreact
Major Version updates for depedencies
bump react and typescript
- react 15.5.4
- typescript 2.5.2
Subject use `next` method
intent$.send
will now become intent$.next
the same API as RxJs Subject and Most Subject
🎉 v1.0 released with Braking Changes
- rewrite in TypeScript, now its Type Safe to use react-most
sink$
is nowupdate$
- now {update$, actions} is called Machine
- no more support for flat function as actions, all actions function need to put in machine.actions
- you can find the machine in react-most connect component via
component.machine
connect(blah)
where blah function should be aPlan
type, aPlan
must return aMachine
- compose will return a flat HoC instead of multilayer HoC, where machines are merge together
upgrade react and remove some deps
- a alacarte data type counter example
- remove ramda dependency
- upgrade to react 15.5
upgrade deps
- upgrade rx to v5
- upgrade most.js to fix unsubscribe issue
- update documents and wikis
v0.6.4
recover with identity if reducer throw error, so other reducer can still work without block by it
connnect is now **composable**
- connect will return a composable wrapper component
let wrapper1 = connect(i=>({inc1: ()=>({type: 'inc'})}))
let wrapper2 = connect(i=>({inc2: ()=>({type: 'inc2'})}))
wrapper1(wrapper2(CounterView))
// wrapper are simply function, so you can
let wrapper = R.compose(wrapper1, wrapper2)
wrapper(CounterView)
- use
actions
as default field to define actions
const Counter = connect(intent$=>{
return {
sink$: intent$.map(...),
inc: ()=>({type:'inc'}), // <-- these are actions,
dec: ()=>({type:'dec'}), // <-- if it confuse you why they're same level with sink$
actions: { // <-- now you can put all actions inside `actions` field
inc3: ()=>({type: 'inc3'})
},
}
})(CounterView)
log intent stamp only in debug mode
env NODE_ENV=debug npm test
to see intent time stamp- time stamp include milisec
- mergeAll([ReactClass.defaultProps, initprops, props])
const View = props => <div>hehe</div>
View.defaultProps = {blah} // <-- 1 defaultProps
const Component = connect(blah, initprops)(View) // <--- 2. initprops
<Component props={blah}> // <--- 3. props
piority 3>2>1