v1.0.0 Prerelease 2
Pre-release
Pre-release
There was a release earlier today that was missing a couple of important commits. I've re-released this version to make sure those changes are in this release.
Notable Breaking Changes
- Thunks are no longer enabled by default. If you use thunks, just change the way you create your store:
-- Previously, with 1.0.0-pre1:
local store = Store.new(reducer, initialState)
-- Now, with 1.0.0-pre2:
local middlewares = {Rodux.thunkMiddleware}
local store = Store.new(reducer, initialState, middlewares)
-- If you don't use thunks, this change isn't necessary.
- Actions are now required to have a
type
field, in order to support utilities likecreateReducer
. This was already convention in both Redux and Rodux, but was never documented.
All Changes from 1.0.0 Prerelease 1
- Added concept of middleware, an optional third argument to
Store.new
. Docs coming soon! - Added
Rodux.loggerMiddleware
, for debugging actions as they're dispatched - Added
Rodux.createReducer
, which makes reducers that respond to several kinds of actions much easier to follow. It works just like theredux-create-reducer
package from npm for Redux. - Added
Rodux.combineReducers
, which works just like Redux'scombineReducers
. It makes creating a reducer that just combines a bunch of other reducers much easier and less error-prone. - Added
Rodux.thunkMiddleware
, which replaces the thunk functionality that used to be enabled by default.
Installation
Either download the source from this release and copy the lib
folder into your project (like if you're using Rojo), or insert the attached rbxmx
file into your game's place!