kea v2.1.1 Release Notes

Release Date: 2020-06-14 // almost 4 years ago
    • Read the blog post: https://kea.js.org/blog/kea-2.1
    • Simplified the syntax even more! You don't need to pass () => ({ ... }) to actions, reducers, etc if there's nothing you want from the logic. Just pass {} instead.
    • Simplified syntax for selectors when not using the function syntax: javascript kea({ selectors: { doubleCounter: [ selectors => [selectors.counter], (counter) => counter * 2 ] } })
    • Listeners get the store's previousState as their 4th argument. You can use selectors (selectors.myData(previousState)) to get the any value as it was before the action was dispatched.