|
|
|
|
|
by anentropic
573 days ago
|
|
My comment was just thinking out loud really... It seems like if you're not doing data fetching in the component then there's no need for it to be async. And then I was wondering if maybe data fetching in components was a good pattern. It's quite different from what I'm used to doing. |
|
Regarding data fetching (it's a recurring theme in the comments), I'd probably do most of my async business logic in my routes (well, I'm obviously using htmy with FastAPI and HTMX through FastHX), and components may fetch additional resources if they need something other than the route's result (translations, markdown, html snippets, some other IO).
I'm not sure if any other tool really enables this pattern, but I'm quite curious to see how I'll use it in future projects, and hopefully also what ideas and patterns others come up with in their projects. There's definitely room for creativity.