Skip to content

3.1.0

Choose a tag to compare

@tomas-light tomas-light released this 14 Mar 21:31
094de39

馃毀 Breaking changes:

  • 馃敤 removed all methods from actions to achieve serialization clearance and avoid redux warning
    • instead of action.stop() use stopAction(action)
    • instead of action.addNextActions(action2) use chainActions(action, action2)
    • instead of action.executionCompleted = ... use waitAction (see bellow)
    • initial value of storeSlice is plain object now
  • 馃悰馃敤 createReducer payload type is corrected

馃殌 Features:

  • waitAction - you can wait action execution with promise syntax
const dispatch = useDispatch();
await waitAction(MyController.fetchUsers(), dispatch);
  • add helpers for test
    • getStoreSliceUpdateActionType - helps you to extract an action type of store slice update method
    • makeActionType - helps you create an action type with passed parameters to compare an action type in your tests with expected value
    • mockMiddlewareForTests - helps you mock middleware and state, dispatch actions and analyze the process

馃敤 Tech fixes:

  • updated redux dependencies
    • redux to 5.0.1
    • @reduxjs/toolkit to 2.1.0
    • react-redux to 9.1.0
  • makeActionType function is exported
  • isAction changed conditions of action determination (removed methods, and added action type)