Next.js Discord

Discord Forum

Extremely frustrated with NextJS...

Unanswered
La Sagra's Flycatcher posted this in #help-forum
Open in Discord
Avatar
La Sagra's FlycatcherOP
I've been blocked from making progress on a project for more than a week because of 2 issues.

One causes browser navigation issues and crashes the website.
The second causes protected routes to function improperly, sometimes not protecting when it should and sometimes protecting when they shouldn't.

I could provide the links to these issues but they don't get responses anyway (on stackoverflow, the next reddit, or the next discord. Is there any way I can just have a voice conversation with somebody who knows how to fix these simple issues? There is truly nothing crazy happening.

😞 ready to use react router instead

7 Replies

Avatar
Northeast Congo Lion
I could provide the links to these issues but they don't get responses anyway
well, good talk
Glad we could help lol
Avatar
tafutada777
because there is no clue in your post above.
my advice on debugging APIs, make use of debugger and cURL, make sure if cookies are sent along with payload.
Avatar
joulev
If you need technical assistance, you need to tell us what exactly is wrong so we can even help. If this post is just to spread hatred and heated arguments, such posts are not welcome here.

If your question sit around unanswered, it's because your question was hard to understand, lacking in information or was otherwise bad. See here for how to ask a good question that is likely to get answered: https://discord.com/channels/752553802359505017/752553802359505020/1108132433917919292

Is there any way I can just have a voice conversation with somebody who knows how to fix these simple issues?
If you mean the Next.js team, no. You have to know them personally, then you can ask them to spend a few minutes with you. But here we don't have any way to contact the Next.js team. The Next.js repository is the closest place where the public can contact the Next.js team.

If you mean anyone who can fix the supposedly simple issue, see my first 2 paragraphs. We are no magicians, you have to provide sufficient information for us to help.

Now you have a few options:
* Make good questions, then the community will be more motivated to help you – and even if we can't help you, I know many people might be able to offer some advice on workaround or different approaches
* Make PRs. Next.js is open source, community contributions are always welcome. If those issues are so simple then why not?
* Wait for it to be fixed, if it is really a bug. Next.js maintainers are just normal humans, they only have so many hours to work on Next.js, they can't possibly have time for everything
* Use something else. No one forces you to use Next.js, so if it is so frustrating, the healthiest option is to just not use it.
Now I will watch this forum post as a moderator, and I would like to warn in advance anyone who might want to trigger heated arguments or post toxic messages: stop. I have the green light to use the hammer. Please, engage in civil conversation.
Avatar
La Sagra's FlycatcherOP
Thank you all for responding

I'm struggling to find a way to protect routes based on user auth. I have a '/' route which is unprotected and has a link to '/account' which is a protected route and should redirect you to '/signup'.

I have tried getting the user session in middleware and then redirecting if necessary, and I have tried getting the user session in a server component route and redirecting if necessary.

In both cases, the caching of the server component route means that for a minute or so after auth state changes from signed out to signed in, going to /account still redirects to /signup.

Note that typing the url into the browser's search bar will result in a correct navigation without using the cache. But if you use the <Link> on the '/' path to go to '/account' then the cached route will be used and thus it will redirect incorrectly.

I tried setting export const revalidate = 0, but this did not change the behavior.

Here is the code repository, would super appreciate someone taking a quick look.
https://github.com/bztravis/gifgrams
deployment:
https://gifgrams.vercel.app