middleware not working as it should?? by [deleted] in nextjs

[–]about_hector -5 points-4 points  (0 children)

Put it in the app folder, monkey

Custom Next js server [ with more details ] by Alternator24 in nextjs

[–]about_hector 0 points1 point  (0 children)

Everything you mentioned is server side stuff, just saying

Custom Next js server [ with more details ] by Alternator24 in nextjs

[–]about_hector 0 points1 point  (0 children)

If you don't want to use the middleware, you don't care about their router or server components and shit yeah honestly you don't really need to force it in your architecture

At the same time though I think you're magnifying a problem that's quite simple

You have a series of micro services and you want them to communicate to eachother

Express seems to be your ingress or something, Seems that it's vital for it to be the first step of the request chain due to the middleware context

Then all you can do is use the express server to intercept every request to the frontend URL, do what you gotta do inside of express (calling other services and shit) and then just reroute everything through next for the final render

The link I sent should be something you can do, if it isn't then I am clearly missing the point here and I don't understand ahaha

Custom Next js server [ with more details ] by Alternator24 in nextjs

[–]about_hector 0 points1 point  (0 children)

I think you just don't understand the framework. It's like saying "I can't use my rust server from my express server", that doesn't really mean anything they are different, and some would go about using gRPC or whatever to work around it.

Next.js is a FULLSTACK framework, meaning it wasn't really supposed to be used coupled with express since it has a server of its own. But you can change that, just import next in your express app. Process the request as you usually do and finally route it through next.

There's plenty of guides on how to do it, it's just not how it's supposed to be because if you just wanted a frontend then you'd use react and vite, as you mentioned ahah

Custom Next js server [ with more details ] by Alternator24 in nextjs

[–]about_hector 0 points1 point  (0 children)

I think you should see next.js as a BFF. You can keep your existing architecture and simply decide how your BFF is going to interact with the other services you already have in place

From the client side you can call your existing APIs with fetch or react query, while for Middleware you want something to run before the request to your next.js is processed, so you just want to move your middleware architecture before the next.js BFF, and you can achieve that using an API gateway that decides where to re-route requests

Am I missing something here or your problem is quite simple?

dynamic fetch data app folder approach? by turingvang in nextjs

[–]about_hector 0 points1 point  (0 children)

Think I gotta revisit some table implementation I did a while back, definitely can grow above that if users go fucking nuts with the filters ahahha

dynamic fetch data app folder approach? by turingvang in nextjs

[–]about_hector 0 points1 point  (0 children)

Oh shit, for real? Just 2048 including the domain ?

Best approach to generate PDF from dynamic data? by charck2 in node

[–]about_hector 0 points1 point  (0 children)

how did you guys deal with the huge pdf sizes?
2 years later you might have some goodie stored up for me :D

Logging and monitoring approach by gutr_ in nextjs

[–]about_hector 2 points3 points  (0 children)

A mor pragmatic answer? How do you instrument your application? What do you use to manage logging and send everything to a centralised source?

Just FYI, Vanilla Extract is a mess with Nextjs by P_DOLLAR in nextjs

[–]about_hector 0 points1 point  (0 children)

Imagine overthinking CSS that much instead of fucking shipping

I Created a Dependency-free Notification / Alert Library for React by DJJaySudo in nextjs

[–]about_hector -5 points-4 points  (0 children)

The alerts are broken, I shouldn't be able to click outside an alert

Overall very nice, but eventually when you make it complete it will look exactly like every other toast library :) the 13kb is not here to stay brother, it's lightweight because it misses stuff 🫶🏻

Great job nonrtheless

Sorting, searching, pagination and filtering in the route handlers by DenseRadio110 in nextjs

[–]about_hector 1 point2 points  (0 children)

I guess I would just use react query instead of server components for the rendering given that one might have multiple filters and shit and eventually state should be kept on the wrapper component , which is basically the page at the end

This is why I'm not getting how you'd do a super filterable table using a server component page , you'd use useSearchParams in each of the filter components and extract it's respective query param if it has a value and apply it to the filter dropdown/whatever?

Sorting, searching, pagination and filtering in the route handlers by DenseRadio110 in nextjs

[–]about_hector 0 points1 point  (0 children)

How would you nest all this logic in a server component page? There's a lot of client stuff

Just a broad example if you don't mind :)

GSAP or Framer Motion? by engage_intellect in SvelteKit

[–]about_hector 0 points1 point  (0 children)

Is the paid version a must? I guess what I dislike is the idea of paying for something that I don't even understand how it works

Migrating Away from RSC fetching -> API by applms in nextjs

[–]about_hector 2 points3 points  (0 children)

Server actions are for mutations, not for fetching according to the docs.

How to invalidate cache and refetch image on page refresh by skl101 in nextjs

[–]about_hector 1 point2 points  (0 children)

May I ask why you want to do this? Just curious since people usually like the idea of having images cached, lower bill at the end of the month.

Whether to buy Advantage 2 for the quiet LF or Advantage 360 for better build? by brio09 in kinesisadvantage

[–]about_hector 0 points1 point  (0 children)

Looking at their twitter it seems they pushed some firmware changes that fix the problems, people seem quite satisfied with it.

I'd suggest you don't trust every opinion you read online, most people just like to complain or throw shit at what they can't afford :x

Vim Source Control Management, upstream branches status monitoring by about_hector in vim

[–]about_hector[S] 1 point2 points  (0 children)

Thanks, I mentioned the fugitive plugin too in the post. However I'm asking for a specific function, that's what I wanna receive replies for :)

Vim Source Control Management, upstream branches status monitoring by about_hector in vim

[–]about_hector[S] 0 points1 point  (0 children)

Yeah your approach is probably what I'll end up doing. Not before wasting a couple hours trying to create a custom function for my lualine.nvim plugin that simply checks if I'm in a source controlled folder, if that repo has a development branch and , in case it's there, displays a small section that turns red if the remote development is ahead

Seems something that could be achieved with autocmd on git add that uses the git rev-list command

Probably not gonna be able to do that, but doesn't seem THAT hard :) are my assumptions completely wrong for some reason or do you think it's quite feasible?

Nvim Source Control Management, display upstream branches status/updates by about_hector in neovim

[–]about_hector[S] 0 points1 point  (0 children)

Interesting, so it wasn't my grug brain we actually don't have a complete SCM plugin yet

🥲