- Ferp is getting even smaller, without breaking the feature bank.
- Ferp update messages should be functions that accept state and return a
[newState, nextEffect]
tuple. - No
update
in your ferp app signature. - Ferp returns the dispatch function instead of
{ detach, dispatch }
- detach can be implemented in userland. - Removed auxillery effects
delay
andraf
- Remove auxillery subscription
every
- New app signature,
{ init: [state, effect], subscribe: (state) => [], observe: ([state, effect], actionName) => {} }
init
is what you've always known it to be, the initialization of the appsubscribe
continues to create/manage subscriptionsobserve
is a callback that is ran every new state change, and may provide a reasonable way to hook into external systems in a much easier way.
- Effects guaranteed to run in series, but keep in mind that
defer
will complete asynchronously. - New
effects.act()
to run an action in side-effects.
- Ferp does not wait for asynchronous effects anymore, which means
defer
ed effects cannot guarantee order of their dispatched results. - Dispatch is not wrapped in a fixed
setTimeout(doDispatch, 0)
.
- Pure and memoize were known but accepted memory leaks, but I've finally decided these are quite bad for long running applications. They have now been removed, which should noticably improve memory and speed issues.
- The ferp github has been published to ferp.mrbarry.com. Please give it a read and leave me feedback.
- I noticed that ther was a very quick buildup of performance and memory issues using freeze in stateManaager, so that's gone.
I'll need to investigate more if it's an issue with
pure()
orProxy
. Both are probably expensive.
- WIP Gitbook documentation. Check it out @ https://ferp-js.gitbook.io/ferp. Will add to README once it's in better shape.
- Removes git revision links here in the changelog. The git tags and releases is more than enough in github.
- Fixes issue where subscription object arguments were being re-wrapped in freeze() each state update, causing new subscription destroy/create cycles.
- Adds
util.pure()
, a way to declare functions as pure, with memoized stores attached to them.
- Adds memoize store implementation
- Refactors and optimizes subscriptionHandler using memoize
- Fixes issue where the call stack would overflow when comparing big/self-referrential objects in subscription arguments.
- Renames
Effect.map
toEffect.batch
- Removes
ferp.types.Effect
- Moves effect primitives into
ferp.effects
asnone()
,batch([])
,defer(promise)
, and newthunk(method)
- Disables
ferp.types.Result
- It may come back, or be removed in a future release - Changes
ferp.effects.delay
- Exposed as a single function that delays for n milliseconds
- Reverses param order to be
ferp.effects.delay(message, milliseconds)
to align with the raf effect
- Changes
ferp.subscriptions.every
- Exposed as a single function that ticks every n milliseconds
- Reverses param order to be
ferp.subscriptions.every(message, milliseconds)
to align witheffects.raf
andeffects.delay
- Adds a changelog
- Huge test coverage improvement
- Many internal changes that simplify the
ferp.app
function - Adds
ferp.util.combineReducers
to manage nested reducers that run effects - Adds
ferp.effects.thunk
effect primitive
- Adds tests around subscriptionHandler
- Issue where subscriptions that immediately dispatch could cause an infinite loop
- Updated subscriptions to not require an id prefix
- Further linting
- Adds test for effect ordering
- Fixes issue with effects not running in a deterministic order
- Many fixes and touch-ups to the game-input example
- Issue where mapped effects weren't being executed properly
- General code cleanup
- Adds
effects.delay.raf
to requestAnimationFrame
- Fixed ava tests that were being cached unexpectedly
- Adds testing with ava
- Adds linting with eslint
- Adds game-input example
- Adds rollup and config
- Upgrades code to use es6 imports, since ava already brings in babel dependencies