Skip to content

Commit 1483f1a

Browse files
authored
Update README.md
1 parent 5947fda commit 1483f1a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,12 @@ const pokemonLoader = baseLoader.extend({
225225
});
226226
```
227227

228-
New properties will overwrite existing.
228+
New properties will overwrite existing.
229+
230+
It's worth mentioning that `queries` and `transform` are linked in this context, meaning that if you supply a new `queries` argument in the extended loader, but no `transform`, then you will **not** inherit the `transform` from the original loader. You either overwrite both or none of these.
231+
232+
* Supplying _just_ a new `queries` argument will result in `transform` being `undefined` in practise.
233+
* Supplying _just_ a new `transform` argument will result in the new transform being ignored.
234+
* Supplying a new `transform` _and_ a new `queries` argument will properly overwrite the existing base properties.
235+
236+
All other properties in the loader will overwrite as expected. You can, for example, just supply a new `onLoading`, or `onError`.

0 commit comments

Comments
 (0)