From the course: Learning NgRx
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Core concepts: State and actions - Angular Tutorial
From the course: Learning NgRx
Core concepts: State and actions
- [Instructor] Welcome to this video where I'm going to talk about some of the core concepts of Redux and NgRx, starting with the notions of state and actions. First, let's talk about the concept of state. In Redux, the state represents every single piece of data in your application. This means that everything that is rendered on the screen. All of the data of our application as well as any configuration information, session data, or user preferences have to be part of the state. The idea behind the state is that if we save that information on a server, a user for our application could sign on a different computer tomorrow and see the exact same screen as what they can see right now. That's why we need all of that information to be part of the state. Another important point about the state is that it is a single point of truth, which means that all of our data has to be there and it is the only location where the data is. Now, let's take a look at an example of state in the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.