denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.18k stars 623 forks source link

Async Components #2336

Open avalero opened 6 months ago

avalero commented 6 months ago

Is there any way to define async components? It would be nice to be able to delegate server side data fetching to components.

marvinhagemeister commented 6 months ago

No, not at the moment. The closest we have is async routes, see https://fresh.deno.dev/docs/concepts/routes#async-route-components . Support for true async components in Preact on the server got merged a few days ago, and we'll likely adopt that model sometime in the future. There is no ETA for that yet though.

vicary commented 6 months ago

@marvinhagemeister that was wonderful! Albeit no ETA, thanks for making true server components a reality.

avalero commented 6 months ago

Thanks!

marvinhagemeister commented 6 months ago

Re-opening until we've landed truly async components.