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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
SvelteKit loads data imperatively through
+page.js
and+page.server.js
.Idea
We could support non-imperative loading too, based on the extension of
+page.???
and+page.server.???
.For example, if I want my page to backed by JSON, I would define a
.json
file instead:in
+page.json
:Then the loading logic could be implied as:
The user wouldn't have to write the loader, it would be provided based on the extension type.
.csv
->CSVLoader
.Same idea would work for
.json
,.csv
,.graphql
,.sql
etc..Why?
Why not?
Beta Was this translation helpful? Give feedback.
All reactions