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: docs/data-loaders/rfc.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,7 @@ It's important to add the `DataLoaderPlugin` before the router to ensure the nav
219
219
220
220
### Core Data Loader features
221
221
222
-
These are the core features of the Data Loader API that every data loader should implement. Throughout the RFC, we will use a **non-existent**, **generic**`defineLoader()`. This is a placeholder for the actual name of the function, e.g. [`defineBasicLoader()`](./basic.md), [`defineColadaLoader()`](./colada.md), etc. In practice, one can globally alias the function to `defineLoader` with [unplugin-auto-import](https://github.com/unplugin/unplugin-auto-import).
222
+
These are the core features of the Data Loader API that every data loader should implement. Throughout the RFC, we will use a **non-existent**, **generic**`defineLoader()`. This is a placeholder for the actual name of the function, e.g. [`defineBasicLoader()`](./basic/), [`defineColadaLoader()`](./colada/), etc. In practice, one can globally alias the function to `defineLoader` with [unplugin-auto-import](https://github.com/unplugin/unplugin-auto-import).
223
223
224
224
Data Loaders should be able to load data based **solely on the URL**. This ensures that the page can be shared and that the rendering is consistent between the server and the client.
Each custom implementation can augment the returned properties with more information. For example, [Pinia Colada](./colada.md) adds `refresh()`, `status` and other properties specific to its features.
340
+
Each custom implementation can augment the returned properties with more information. For example, [Pinia Colada](./colada/) adds `refresh()`, `status` and other properties specific to its features.
341
341
342
342
#### Parallel Fetching
343
343
@@ -446,7 +446,7 @@ This allows nested loaders to be aware of their _parent loader_. This could prob
446
446
#### Cache <Badgetype="warning"text=">=0.8.0" />
447
447
448
448
::: warning
449
-
This part has been removed from the core features of the API. It's now part of custom implementations like [Pinia Colada](./colada.md).
449
+
This part has been removed from the core features of the API. It's now part of custom implementations like [Pinia Colada](./colada/).
450
450
:::
451
451
452
452
#### Smart Refreshing
@@ -455,7 +455,7 @@ This is not a requirement of the API.
455
455
456
456
When navigating, depending on the loader, the data is refreshed **automatically based on what params, query params, and hash** are used within the loader.
457
457
458
-
e.g. using [Pinia Colada](./colada.md), given this loader in page `/users/:id`:
458
+
e.g. using [Pinia Colada](./colada/), given this loader in page `/users/:id`:
One of the advantages of having an initial state is that we can avoid fetching on the client. Data Loaders can implement a mechanism to skip fetching on the client if the initial state is provided ([Pinia Colada](./colada.md) implements this). This means nested loaders **aren't executed either**. Since data loaders shouldn't contain side effects besides data fetching, this shouldn't be a problem.
491
+
One of the advantages of having an initial state is that we can avoid fetching on the client. Data Loaders can implement a mechanism to skip fetching on the client if the initial state is provided ([Pinia Colada](./colada/) implements this). This means nested loaders **aren't executed either**. Since data loaders shouldn't contain side effects besides data fetching, this shouldn't be a problem.
492
492
493
493
### The Navigation Guard
494
494
@@ -830,7 +830,7 @@ This aligns with the future [Navigation API](https://github.com/WICG/navigation-
830
830
831
831
### Interfaces
832
832
833
-
Defining a minimal set of information and options for Data Loaders is what enables external libraries to implement their own data loaders. They are meant to extend these interfaces to add more features that are specific to them. You can see a practical example with the [Pinia Colada](colada.md) implementation.
833
+
Defining a minimal set of information and options for Data Loaders is what enables external libraries to implement their own data loaders. They are meant to extend these interfaces to add more features that are specific to them. You can see a practical example with the [Pinia Colada](./colada/) implementation.
834
834
835
835
::: danger
836
836
This section is still a work in progress, see the [implementations](#implementations) instead.
0 commit comments