...

/

Example of the Store

Example of the Store

Let's explore what a Store is with the help of an example.

What is a Store?

So far, we’ve mentioned State and Store, but sometimes it’s difficult to know what the difference between the two is. Let’s try to clear up the distinction between the two.


A Store is an Object from NgRx that contains the State of the application. This Store object has an API that allows us to manage the State contained within the Store.


The State is the data we create for our application, which is specific to the application we’re building. So, from our apple example earlier, applesCount is the state information, which we keep in a Store object. ...