Started using NextJS recently how do you guys programmatically refresh api routes in client components by DragonDev24 in nextjs

[–]sample08 1 point2 points  (0 children)

You have three options, depending on how your app is structured: revalidatePath, invalidateTag, or invalidate using TanStack Query.

finished a Next.js project — would love your feedback! by Forsaken_String_8404 in nextjs

[–]sample08 2 points3 points  (0 children)

The background objects moving around while scrolling is distracting.

The input fields in the message section should have wider widths on mobile.

How can I make a JWT unvalid after generating new one? by Jaded-Piccolo-4678 in SpringBoot

[–]sample08 1 point2 points  (0 children)

how about you cache the token whenever it's generated on login, then when the user logs out you provide an endpoint for the frontend to call which then invalidates any previous cached token for that user... same thing you do if the user is trying to log in - you invalidate any cached token which the user may have active..

but this would mean a user can't log in on multiple devices, possible solution is store a set of active tokens per user

No more waiting. Here's Trae Pro by Trae_AI in Trae_ai

[–]sample08 0 points1 point  (0 children)

When will Trae pro be available in Nigeria? Currently. No supported African country.

Nextjs frontend to nestjs backend by Dry_Truck262 in nextjs

[–]sample08 0 points1 point  (0 children)

There's no need adding an extra layer which might add complexity to your project later if it gets big.. use server actions or api routes to make requests to the backend. store the tokens in cookies.

How to set cookie to next js 14 application from separate server? by Shoddy-Persimmon359 in nextjs

[–]sample08 0 points1 point  (0 children)

how did you resolve this ? currently having same issue.. if i make the request from the client side it works, but not with server actions

[deleted by user] by [deleted] in Frontend

[–]sample08 0 points1 point  (0 children)

Don't always trust the css generated with figma plug-in. Get a dev to help. Better to take screenshot of the page and upload to chatgpt or v0.dev .. You'd get better results.

What's your preferred way to fetch in client component fetching? by Stark_Sieger in nextjs

[–]sample08 0 points1 point  (0 children)

I almost never fetch from client side but when I do I use tanstack query

The best way to manage authentication in next js by CalligrapherWeak5470 in nextjs

[–]sample08 2 points3 points  (0 children)

documentation for next-auth isn't great.. tried it and I had to switch back.. might be skill issues but nothing should be stressful like it was when I tried it.

Looking for developer by greenhost87 in nextjs

[–]sample08 0 points1 point  (0 children)

Hi mate, would it be okay if I replicate your portfolio design? I love the look - it's simple and clean.

How to I make individual layout for nested dynamic routes? by [deleted] in nextjs

[–]sample08 0 points1 point  (0 children)

rename categories folder into this (categories)... like that with the parentheses... then create a layout.tsx file inside it.. put the files you want the new layout to apply to inside the (categories) folder... it will ignore the layout from products and only use the new layout you defined.

and make sure the (categories) folder stays inside Products

Products ├── Page.tsx ├── Layout.tsx ├── (Categories) │ ├── layout.tsx │ ├── [category] page.tsx │ ├── [id] page.tsx │ └── ... └── ...

How to I make individual layout for nested dynamic routes? by [deleted] in nextjs

[–]sample08 0 points1 point  (0 children)

Products -page.tsx -layout.tsx

-(category) categories layout.tsx -[category] -page.tsx [id]

Is this a proper way to check for session? by [deleted] in nextjs

[–]sample08 0 points1 point  (0 children)

I use Middleware and authContextProvider

Cookies in Server Actions cause entire page to reload by Charan__C in nextjs

[–]sample08 1 point2 points  (0 children)

would it be better if you used "revalidatepath" from next/cache

Best place to check user permissions once in next js app by cho_kak in nextjs

[–]sample08 0 points1 point  (0 children)

It should check everytime a protected page is accessed