Just a new unit test.
Reconnecting to the machine when the component is re-mounted. Issue #38, PR: #39.
Changing the way of how Stent names stuff. Issue: #32 , PR: #33
Making sure that we check gets send to the call
generator helper.
Action handlers are pure functions now, i.e. they receive the machine as first argument and do not rely on this
context.
Custom machine functions are no longer supported.
Example for a handler before 6.x:
'add todo': function (state, todo) {
return {
name: 'idle',
todos: [...state.todos, todo]
};
}
Example for a handler function in 6.x:
'add todo': function ({state}, todo) {
return {
name: 'idle',
todos: [...state.todos, todo]
};
}
Example for an arrow function as handler in 6.x:
'add todo': ({state}, todo) => ({
name: 'idle',
todos: [...state.todos, todo]
})
Every action now has a dedicated helper to see if it is available in the current machine transition set. For example:
{
'idle': {
run: 'running'
},
'running': {
stop: 'idle'
}
}
// we have
machine.isRunAllowed();
machine.isStopAllowed();
Fixing the case where the call
function has no return statement.
The machine is no longer sent as a context of a function used in call helper. With this version also we are fixing the error handling of chained generators.
Stent is no longer sending uid to a middleware when initializing.
Support of custom methods added to the machine.
DevTools middleware moved to Stent DevTools emitters project.
Updates in the DevTools middleware.
Proper serialization of an error.
Exposing the call
helper.
Fire generator resume middleware hook in the proper moment. Also covering the case where the generator is resumed with an error.
Calling onActionProcessed when the generator finishes.
Sending unique ID to the DevTools instance.
Adding onGeneratorEnd
and onGeneratorResumed
action types to the middleware.
Changes in DevTools extension.
Updating DevTools middleware onMachineConnect action.
Send the current machines' state in every DevTools message.
Improving DevTools middleware + test coverage
Adding onMiddlewareRegister
middleware hook.
Exporting DevTools middleware.
Adding DevTools middleware.
Passing the name of the React component to the middleware hook.
Adding disconnect middleware call.
Fixing a critical bug introduced by 3.2.0 (do not use it).
Adding machine destroy
method.
Tooling for the devtools.
Adding new middleware hooks. (onMachineCreated
, onMachineConnected
, onMachineDisconnected
)
Adding devtools window global key access.
- Adding
machine.<method>.latest
alias so we cover thetakeLatest
saga method - Changing the way of how the middlewares work. They now don't block the Stent's logic. No
next
method anymore. Middlewares - Documentation is restructured
Killing the wait
generator helper. It is an anti-pattern. We shouldn't listen for actions like that. If there is such a need we better create a dedicated state for it.
Also some clean up.
Updating README + adding npm ignore file.
Making sure that the js context is kept while running generators.
Do not create a new error if a promise in a call
gets rejected.
Just a README update.
Stop trying to print object in the Logger middleware.
Adding onGeneratorStep
to the middleware's hook.
- Adding
Logger
middleware - When adding a middleware the hook
onStateChange
is now calledonStateChanged
Making sure that the mapping callback is fired only when the connected machine is updated.
README changes.
Fancy logo.
NOT throwing an error if the dispatched action is missing in the current state.
Short syntax for creating a machine.
Support of no mapping function in the connect
helper + support of mapSilent
for the React's version of connect.
Support of wait(actionA, actionB)
on top of wait([actionA, actionB])
Wild Wild West ...