Skip to content

Commit 144d21f

Browse files
committed
docs: add tip when mixing universal and server load
Since modifying `data` include non-serializable POJOs (such as components) will throw an error, this change provides a hint for users not to do that.
1 parent bbdd6e2 commit 144d21f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

documentation/docs/20-core-concepts/20-load.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ export async function load({ data }) {
216216
}
217217
```
218218

219+
> It's important to not modify `data` to include any non-serializable objects since it will be processed by the **server** `load` after the **universal** `load` returns.
220+
219221
## Using URL data
220222

221223
Often the `load` function depends on the URL in one way or another. For this, the `load` function provides you with `url`, `route` and `params`.

0 commit comments

Comments
 (0)