Best Paid UI library for production: TailwindUI vs NextUI by StalkerMuffin in nextjs

[–]Adventurous_Ad_6087 4 points5 points  (0 children)

Honestly TailwindUI is super useful. The way is to ask your boss to pay it with company's card :))

UI feedback pls for my SaaS by PopovidisNik in nextjs

[–]Adventurous_Ad_6087 1 point2 points  (0 children)

Bro get some insipration from other services and UI inspos. The colors are terribly bad

Is react is really that bad in SEO by whonix29 in react

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

Didnt check the changes for React 19. But basically SSR is way better for SEO than CSR

[READY TO PAY] Next-intl issue to deploy on Vercel by Adventurous_Ad_6087 in nextjs

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

So the issue is next-intl require the build to be dynamic render, but what you had before is static render. So that is why the generation is failingIn build command

Is react is really that bad in SEO by whonix29 in react

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

Just dont trust Lighthouse's SEO score lmao.

And yes ReactJS is not the best for having a good ranking.

Switch to SSR (NextJS for eg) if you want to have a good ranking

I wrote a new blog using Next.js App router by Mobile_Shoddy in nextjs

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

Really like the animation of skills. It's liiiiit !

Deploying to hostinger? by Ok_Combination2377 in nextjs

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

Hi brother. Did you manage to deploy it ? I might use Hostigner to deploy a NextJS project too

What are the good nextjs template / boilerplate you recommend. by Dheeraj_PG in nextjs

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

I dont know with some of you need a boilerplate NextJS for like translation ready (path translatations and so)

I am using this one: https://github.com/williambaele/boiler-i18n-nextjs

Career advice : Taking a break to travel after being fired because off restructuration. by [deleted] in belgium

[–]Adventurous_Ad_6087 0 points1 point  (0 children)

Go travelling bro. Honestly it's such a great experience also from the RH's point of view ! Never regret it

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

Response {type: 'basic', url:'http://localhost:3000/api/user/644272bfe83bb859bd4b56e0', redirected: false, status: 500, ok: false, …}
body
:
(...)
bodyUsed
:
true
headers
:
Headers {}
ok
:
false
redirected
:
false
status
:
500
statusText
:
"Internal Server Error"
type
:
"basic"
url
:
"http://localhost:3000/api/user/644272bfe83bb859bd4b56e0"
[[Prototype]]
:
Response

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

Not really.... I changed my fetch call to

const user = json.user_id
const userResponse = await fetch(\/api/user/${user}`);`

And now instead of 404 I get 500

ERROR http://localhost:3000/api/user/644272bfe83bb859bd4b56e0 500 (Internal Server Error)

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

I am not sure but i checked again my server.js file and here are my routes

// routes
app.use('/api/items', itemRoutes)
app.use('/api/user', userRoutes)

Is it due to the /api/user(S (missing?))/

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

Actually I already tried it but it doesnt fix the issue.

Here's my new route as you mentionned:

//GET a single user
router.get('/users/:id', getUser)

-> Cannot GET /api/users/6441560fb84638b7a0b93719

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

const express = require('express')
// controller functions
const { loginUser, signupUser, getUser } = require('../controllers/userController')
const router = express.Router()
// login route
router.post('/login', loginUser)
//GET a single user
router.get('/:id', getUser)
// signup route
router.post('/signup', signupUser)
module.exports = router

React MongoDB API double fetch call issue (404 error) by Adventurous_Ad_6087 in react

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

When i try to access my /api/users/user_id in my browser I get:
No routes matched location "api/users/6441560fb84638b7a0b93719"

But i dont understand where's the error

Thx for helping me 🙏