Open pepicrft opened 2 years ago
Loaders by Remix
I really liked that components can export a function that implements how the data needed to render the component is fetched. The framework uses the components' AST to get all the load
functions, run them concurrently, and then render everything server-side with the data.
Because Remix is opinionated about the UI framework, React, their syntax is coupled to React APIs (e.g. hooks). We should come up with a different API that works with Vue and Svelte components too. For example defining the load function in a different file:
components/
avatar.svelte
avatar.load.ts
I created this issue to jot down ideas from other frameworks that we could take inspiration from for Gestalt.