Skip to content

Commit fffb99f

Browse files
author
Daniel Woznicki
committed
Added a quick note about when sorting is triggered
1 parent cbdd25e commit fffb99f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api/createEntityAdapter.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ If provided, the `state.ids` array will be kept in sorted order based on compari
103103

104104
If not provided, the `state.ids` array will not be sorted, and no guarantees are made about the ordering. In other words, `state.ids` can be expected to behave like a standard Javascript array.
105105

106+
Note that sorting only kicks in when state is changed via one of the CRUD functions below (for example, `addOne()`, `updateMany()`).
107+
106108
## Return Value
107109

108110
A "entity adapter" instance. An entity adapter is a plain JS object (not a class) containing the generated reducer functions, the original provided `selectId` and `sortComparer` callbacks, a method to generate an initial "entity state" value, and functions to generate a set of globalized and non-globalized memoized selector functions for this entity type.

0 commit comments

Comments
 (0)