Initial Improvement
This release changes the raj/react
syntax. The init
is no longer a function that receives props
. See the justification for this change in PR #9. What this means for developers is that,
function init () {
return [model, effect]
}
// becomes
const init = [model, effect]
And React components are built like:
import React from 'react'
import {program} from 'raj/react'
program(React.Component, props => ({
init: [state, effect],
update: (message, state) => [state, effect],
view: (state, dispatch) => {}
}))
This change makes the ecosystem more consistent for things like raj-spa
.