Developing an alternative to coolify using nextjs and hono
Unanswered
Yellow-breasted Chat posted this in #help-forum
Yellow-breasted ChatOP
Hi, I’m building a Coolify alternative just for fun and learning porpose, and I might open-source it so others can use it. For the stack, I chose Next.js (might be overkill, but I prefer it), and for the backend, I went with Hono (an Express alternative).
The question I’m having is whether it’s actually beneficial to use React Query, or if I should just take advantage of Next.js features—like Server Components for data fetching and Server Actions for mutations. Right now, I’m using React Query with Hono RPC, but I’m still early in development, so I can change it.
The question I’m having is whether it’s actually beneficial to use React Query, or if I should just take advantage of Next.js features—like Server Components for data fetching and Server Actions for mutations. Right now, I’m using React Query with Hono RPC, but I’m still early in development, so I can change it.
6 Replies
@Yellow-breasted Chat Hi, I’m building a Coolify alternative just for fun and learning porpose, and I might open-source it so others can use it. For the stack, I chose Next.js (might be overkill, but I prefer it), and for the backend, I went with Hono (an Express alternative).
The question I’m having is whether it’s actually beneficial to use React Query, or if I should just take advantage of Next.js features—like Server Components for data fetching and Server Actions for mutations. Right now, I’m using React Query with Hono RPC, but I’m still early in development, so I can change it.
Use server components for fetching data which needs to be rendered unconditionally, like when user visits the page and you’re sure it needs to be rendered
And use query after the initial server render to do stuff like apply filters
Like if searching for an app, applying filters like created in
Yellow-breasted ChatOP
right, to make code clean should i create server actions to fetch data and call it on server components? or just create normal functions and call it on server components?
Asian black bear
Server actions are only meant to be called from the client for mutations. No fetching, no calls from the server.