Relative Content

Tag Archive for reactjsnext.jsnext.js13app-router

Sharing User Data Between Server Components of Different Pages in Next.js 14

I am using Next.js 14 with the app router. In my main layout file, I am fetching user data using a server component and then sharing that data with a client component. I have a context provider that passes this data to the context, allowing me to easily access the user data across all client components on different pages.

Changes on top level of nextjs app only effect the index page

I have a next app using Bulma, and a ServiceProvider. I import bulma and this provider at the top level of the application. This would be in my layout.js file, however the changes there don’t persist. When you go to a subpage bulmas css stops working and the code errors saying my useSession isnt properly wrapped in the provider.

How to check if user goes to a valid route when using Nextjs

i have a question, i’ve spend the past 2 hours looking for an answer on the web but i haven’t find one. well im using Nextjs with the new App router. when a user navigate to an undefined route in app/api. Ex: (localhost:3000/api/useer/1235) (userr= does not exist) next will respond with a 404 html page […]