Skip to content
This repository was archived by the owner on Mar 20, 2022. It is now read-only.

Commit 488c92a

Browse files
committed
Update docs for Immutable and recursion on denormalize
1 parent 34ee22e commit 488c92a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ const normalizedData = normalize(myData, mySchema);
4343

4444
## `denormalize(input, schema, entities)`
4545

46-
Denormalizes an input based on schema and provided entities. The reverse of `normalize`.
46+
Denormalizes an input based on schema and provided entities from a plain object or Immutable data. The reverse of `normalize`.
4747

4848
*Special Note:* Be careful with denormalization. Prematurely reverting your data to large, nested objects could cause performance impacts in React (and other) applications.
4949

50+
If your schema and data have recursive references, only the first instance of an entity will be given. Subsequent references will be returned as the `id` provided.
51+
5052
* `input`: **required** The normalized result that should be *de-normalized*. Usually the same value that was given in the `result` key of the output of `normalize`.
5153
* `schema`: **required** A schema definition that was used to get the value for `input`.
52-
* `entities`: **required** An object, keyed by entity schema names that may appear in the denormalized output.
54+
* `entities`: **required** An object, keyed by entity schema names that may appear in the denormalized output. Also accepts an object with Immutable data.
5355

5456
### Usage
5557

0 commit comments

Comments
 (0)