Skip to content

Update - State Management #958

@AbdellaToronto

Description

@AbdellaToronto

State Management

  • Ng2-redux not too popular nowadays

Redux and @ngrx

Adding @ngrx to your Project

  • Update install command

Reading your Application State Using Selectors

  • Can store.select still accept an array?

Actions

  • Looks like the Action interface has changed
  • Remove the payload property in the example
  • In createAction, update function signature
  • Update example to use props property

Modifying your Application State…

  • Is the Redux thunk analogy still correct?
  • Should the actions be created beforehand?

Reducers and Pure Functions

  • Check the formatting of the reducer functional signature (spans 2 lines)

Reducers as State Management

  • Simple Reducer -> should it use the createReducer function?

Configuring your Application

  • StoreModule.forRoot instead of StoreModule.provideStore

Side Effects

  • Update @ngrx/effects links
  • Example should use the createEffect() method
  • Configuration should use EffectsModule.forRoot([...])

Getting More From Redux and @ngrx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Spring 2021 WorkUpdate - 2021Updates current content in book during the 2021 update, for example, on out of date info

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions