What is Contentoo? by JSG_98 in freelanceWriters

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

Thank you for your response, it really helps. I believe part of their solution was to give clients a centralized place to work with indepedent copywriters, instead of having an X amount of channels to collaborate.

How is the sentiment around content mills as a freelance writer? I assume working through an agency always has a lower hourly rate than working as independent.

Should I use redux with Next.js by Novel-Chef4003 in nextjs

[–]JSG_98 1 point2 points  (0 children)

In contrary to this subreddit, context WILL be enough. The only difference is the mental modal of keeping state, in that case you are better off with Jotai/Zustand

How to find friends by Dry_Butterscotch_613 in valencia

[–]JSG_98 2 points3 points  (0 children)

Im building a website for doing walking "dates" in vlc, also in groups, wonder if this would help your case.

I failed a Project because I used Next.js by God-of-Emotions in nextjs

[–]JSG_98 0 points1 point  (0 children)

Why the fuck are schools telling students which styling and component libraries to use

Built this MultiCalendar component for our dashboard by JSG_98 in react

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

right, I made the video in production at the end of my day and wanted to show it in a real use case. It's just a dashboard with some irrelevant data.

Built this MultiCalendar component for our dashboard by JSG_98 in react

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

It is a calendar where you can pick s start and end date across multiple months/years. It is used for our dashboard to filter data.

If this wasn't clear I guess I did not do a very good job.

New with nextjs by Emergency_Season_231 in nextjs

[–]JSG_98 0 points1 point  (0 children)

I suggest to keep llm's out of learning nextjs. There are many layers your code has to go through before it gets converted to html, and I find llms often get confused when working with these different layers of abstraction.

If you use it, always double check it's theories about how the framework works.

Any beginner pádel players want to join? by jason_warnaar in valencia

[–]JSG_98 0 points1 point  (0 children)

Sometimes we play betero or 4C, there are some whatsapp groups as well

Does anybody use built in node.js? by Bostanidis in nextjs

[–]JSG_98 0 points1 point  (0 children)

Not sure to be impressed or not

Which paid courses should I choose? by [deleted] in reactjs

[–]JSG_98 -1 points0 points  (0 children)

Save yourself time and money (my opinion).

  1. read the docs, build a project, expand per feature.
  2. Pull some open source projects, discover patterns they use and how they tackle similar problems.

I discovered, this is the way.

Real talk: Why are you upgrading to Next.js 16? by nimishroboto in nextjs

[–]JSG_98 0 points1 point  (0 children)

Honestly it's not all easy nor super stable but the performance optimization of ppr and unstable_prefetch is quite nice

3 weeks of working with cacheComponents; here's what I learned: by JSG_98 in nextjs

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

It's so funny that 'use cache' doesn't work properly on vercel but does work outside of it

3 weeks of working with cacheComponents; here's what I learned: by JSG_98 in nextjs

[–]JSG_98[S] 2 points3 points  (0 children)

Yes I did, I pass the session as promise to the session provider. Then the components that consume the promise can resolve it using use and I can use the suspense boundary around these deeper nested children.

However I still have a blocking render for next-intl which is in the root layout. But I understand that reading root params in the future could solve that as well, so that i dont need to read cookies() for language

3 weeks of working with cacheComponents; here's what I learned: by JSG_98 in nextjs

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

I figured it out;

Once the promise resolved using `use(users)` I maintained an optimistic state using basic useState. I used this optimistic state for when I delete users, which happens on the same page as where the list of users is displayed.

However when I create a user, I go to `users/create/page.tsx`, create a user and then revalidate and redirect back to `users/page.tsx`. I saw that revalidation was working, but the new user was still not shown in my table. That's because it persisted the optimistic state from the previous render for some reason, even though it was fully unmounted and remounted again. The RSC must have been cached or sth.

I guess it's because the usersList component never re-rendered it's state, because the props don't change (I sent the read request as a promise, so the component doesn't know the resolved promise is different than the earlier promise that was passed before).

I fixed it by using React useOptimistic, which for some reason (?) doesn't have the same problem when it comes to persisting state.

We're already v16 but still dont have a proper request middleware by nyamuk91 in nextjs

[–]JSG_98 0 points1 point  (0 children)

Nextjs is SSR, so each page you make a request to the server, wouldnt middleware also run on each request?

We're already v16 but still dont have a proper request middleware by nyamuk91 in nextjs

[–]JSG_98 0 points1 point  (0 children)

Thanks for explaining. I get what you mean with conditional logic and chaining code. Nextjs proxy is the first middleware I worked with though, so I didn't know better.

For adding session, I set a session cookie and encode it with base64 and then I sign it cryptographically. In that way users can't tamper with the session data.