You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/ngrx.io/content/guide/entity/index.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,3 +11,13 @@ Entity provides an API to manipulate and query entity collections.
11
11
## Installation
12
12
13
13
Detailed installation instructions can be found on the [Installation](guide/entity/install) page.
14
+
15
+
## Entity and class instances
16
+
17
+
Entity promotes the use of plain JavaScript objects when managing collections. *ES6 class instances will be transformed into plain JavaScript objects when entities are managed in a collection*. This provides you with some assurances when managing these entities:
18
+
19
+
1. Guarantee that the data structures contained in state don't themselves contain logic, reducing the chance that they'll mutate themselves.
20
+
2. State will always be serializable allowing you to store and rehydrate from browser storage mechanisms like local storage.
21
+
3. State can be inspected via the Redux Devtools.
22
+
23
+
This is one of the [core principles](docs#core-principles) of NgRx. The [Redux docs](https://redux.js.org/faq/organizingstate#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state) also offers some more insight into this constraint.
0 commit comments