You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey. I wouldn't say its better - I'd rather say it is different.
I've been using next-connect for a while but I found its API a bit unintuitive. Probably because of combining routing functionality (which i believe Next.js handles very well on its own) with middleware layer. I also had some issue most likely related to route pattern matching although I did not take advantage of that functionality in my code at all. I neither found fix nor workaround.
I took an opportunity and I've created next-api-compose which completly fit my needs.
Some next-api-compose features that I haven't seen in next-connect:
it has utility that helps with compatibility and also significantly reduces boilerplate code when it comes to using multiple Connect/Express middleware, by converting them to higher order functions and leveraging the original middleware.
it has no dependencies at all - the area of occurring for errors is small.
it is designed specially for Next.js - mentioned earlier area is even smaller.
... and generally I thought sharing next-api-compose with the world would be super cool 😎
As in the title, why should I use this and not https://github.com/hoangvvo/next-connect#readme ?
The text was updated successfully, but these errors were encountered: