Ruben Silva
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Ruben Silva on 9/30/2024 in #questions
Deployng Nextjs app on Windows Server 2019
Here's the thing, there's no Linux options. The client, can only provide VM's running Windows.
The solution was to ditch Next, refactor to vannila React SPA, and move the backend to a REST API.
24 replies
TTCTheo's Typesafe Cult
•Created by Ruben Silva on 9/30/2024 in #questions
Deployng Nextjs app on Windows Server 2019
@Styly thanks for the advice. Going to give it a try.
24 replies
TTCTheo's Typesafe Cult
•Created by Ruben Silva on 9/30/2024 in #questions
Deployng Nextjs app on Windows Server 2019
I'm using both server actions and server components, and yes, the solution that came to mind was replacing them with RTK Query. Although, we're trying to convince the client to setup a virtual machine with Windows 10/11, so that we could install Docker Desktop.
24 replies
TTCTheo's Typesafe Cult
•Created by Ruben Silva on 9/30/2024 in #questions
Deployng Nextjs app on Windows Server 2019
Unfortunately, that's not a option, because that's the client infrastructure. I'm thinking of changing to pages router and working with client side rendering, only.
24 replies
KKinde
•Created by Ruben Silva on 1/12/2024 in #💻┃support
Error: this method must be invoked in a node.js environment
Thank you for the response. I was experimenting with rendering server components inside client components, and that's where the error could be occurring.
4 replies
TTCTheo's Typesafe Cult
•Created by fotoflo on 10/29/2023 in #questions
Where to put / how to cache frequently used user info?
Are you mentioning the query keys (["user"])? If so, those keys are some sort of cache identifiers. Every piece of data that you store as cache, is labeled with a query key, so that when you need to make something with it, like revalidating it, you can target it with the query key.
13 replies
TTCTheo's Typesafe Cult
•Created by fotoflo on 10/29/2023 in #questions
Where to put / how to cache frequently used user info?
Alternately, you could use tRPC on the server, but I'm not sure NextJs would store the data on the server cache.
13 replies
TTCTheo's Typesafe Cult
•Created by fotoflo on 10/29/2023 in #questions
Where to put / how to cache frequently used user info?
My bad, I thought you weren't using tRPC. In that case, because tRPC uses React Query under the hood, you can take a look at their caching examples. Basically you define a query key for your request (["user"] in your case), and every time a request is made using that key, it will fetch the data that was stored on the cache, and when you use a mutation to update that data, you will need to invalidate that query to update it with the fresh data.
You can find a better explanation in the links below:
https://tanstack.com/query/latest/docs/react/guides/caching
https://tanstack.com/query/latest/docs/react/guides/invalidations-from-mutations
13 replies
TTCTheo's Typesafe Cult
•Created by fotoflo on 10/29/2023 in #questions
Where to put / how to cache frequently used user info?
By default, all data you fetch using the fetch API, is cached. You can have the same fetch request in multiple pages or components, it will only make one request.
The problem, in your case, is that your user session is indeed too complex, every time you add a new team, you will need to revalidate the cached data. It would be better for perfomance, to just restructure your data object.
13 replies
TTCTheo's Typesafe Cult
•Created by ali on 10/29/2023 in #questions
should i really use nextjs fronbent ?
Honestly, REST is still the industry standard, to connect backend endpoints to your frontend framework of choice.
Just because Vercel has the goal to make NextJs a fullstack framework, that doesn't mean the industry standards will change.
5 replies
TTCTheo's Typesafe Cult
•Created by iboughtbed on 10/29/2023 in #questions
Best React (Next.js) PDF libraries?
6 replies
TTCTheo's Typesafe Cult
•Created by Giuliopime on 10/17/2023 in #questions
Border that transitions trough row of elements
If you can do it with JS, you can also do it in React or Svelte. I won't say that this is impossible to accomplish with CSS only, but the amount of work it would take it's not worth the effort.
10 replies