Answers for "ngxs Not pushing updated state when data is an Array"

1

ngxs Not pushing updated state when data is an Array

// It's not a problem with NGXS, it's the reference of JavaScript objects. Easy solution:

@Selector()
static todos(state: ToDoStateModel): ToDo[] {
  return [...state.todos];
}
Posted by: Guest on July-14-2021

Code answers related to "ngxs Not pushing updated state when data is an Array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language