Skip to main content

All Questions

Tagged with
0 votes
1 answer
88 views

nextjs "Error: Unsupported Server Component type: undefined"

My code is like below 'use client'; import { UserGroupIcon, HomeIcon, DocumentDuplicateIcon, } from '@heroicons/react/24/outline'; import Link from 'next/link'; import { usePathname } from '...
Kundera's user avatar
  • 155
1 vote
0 answers
61 views

Why am I getting prerender errors in Next.js 14 build?

I am encountering an issue when running the next build command on my Next.js 14 application. The build process fails with the following prerendering errors: I have checked the links provided, but I am ...
riki's user avatar
  • 1,685
0 votes
1 answer
77 views

Handling localStorage in Next.js 14 with SSr and Sequelize

I'm using Next.js 14 for my project. One of the features of the site is to add products to favorites, where the product IDs are stored in localStorage. In the Page.jsx file (located at /favorites), I ...
Mauricio De Oliveira's user avatar
0 votes
0 answers
33 views

How to dynamically add CDN that user wants to my React Project and use it in a client side editor

so here is the thing I have a code editor in my React app ( Monaco - editor ) now I want to load the CDN that the user gives me ( think about it like the user enters his desired CDN in an input ) and ...
Hamid Kamyab's user avatar
0 votes
0 answers
54 views

Dynamically rendering content inside the header component with Next.js

I have the following setup as the layout for an application in Next.js using the app router. The problem that I have that I am unable to find a solution which doesn't give an error inside the header ...
Ákos Kovács's user avatar
0 votes
2 answers
127 views

"localstorage is not defined" nextjs14 "use client" running in server side

I was configuring the context in Tailwind for a Next.js 14 website, and I just wanted to provide a global theme configuration for my project. So, I created the ThemeContext and added the 'use client' ...
Matheus Felipe Vieira Santiago's user avatar
1 vote
1 answer
2k views

Laravel Inertia check current route In JSX file?

I need to check current route in one of my .jsx files to display a specific component, is there a way to imitate Laravel's Route::is() feature? For now I do the following: // helpers.js export ...
dogakorkmaz's user avatar
3 votes
1 answer
767 views

How are client components handled in terms of rendering in React Server Components paradigm,?

I comprehend that server components undergo complete rendering on the server, and they aren't included in the JS bundle transmitted to the client. Additionally, server components don't undergo ...
109 Kunal Khatri's user avatar
0 votes
0 answers
208 views

How to use server functions during initial render in Next.js 13?

I was trying to create a dummy blog project to better comprehend Next 13 when I hit a block trying to crate a paginator. Currently I have a posts directory that runs on the server and uses a component ...
Eugène-René's user avatar
0 votes
1 answer
455 views

Client and server-side out differ when working with user who is logged in (hydration error)

I'm facing React's hydration error, which - according to the documentation - is caused by "using browser-only APIs like window or localStorage in your rendering logic". This probably ...
NotX's user avatar
  • 1,973
1 vote
2 answers
12k views

Why I cannot use `useState` in a child component in Next.js 13?

a new update in NextJS came out (with app router). I am really confused by the client/server side component relationships. I am currently experimenting with it, and it says in the docs that: "...
alEN's user avatar
  • 107
2 votes
1 answer
4k views

How to avoid using "use client" in next 13 with material ui? [duplicate]

I'm trying to build a server-rendered app in next.js 13. When I try to import any material ui component inside the layout.jsx or any other file I get an error. You're importing a component that needs ...
Michal's user avatar
  • 21
0 votes
1 answer
1k views

When re-entering same url with Link Component in Next.js, prefetchQuery doesn't fetch data (SSR)

I'm using Next.js and React Query for SSR. Everything is fine until re-entering the exact dynamic route(e.g. domain/support/guide/faq/[id]). The expected behavior is rendered query data without ...
carryon's user avatar
  • 13
1 vote
0 answers
338 views

Minifying HTML String React

Is there any lib that can minify a HTML string client side just like html-minifier or html-minifier-terser server side? I want to minify a string containing HTML of a email. Works fine server side ...
Thor Christensen's user avatar
0 votes
1 answer
665 views

How to implement client-side on ASP.NET CORE MVC project with RactJS Component

[EDIT] Ok, i unstertood that, if i render my class in a div with id="root" using ReactDOM.render it work and i can use console.log(). But i need that this component, that is in a Razor pages,...
Matteo Pagliarello's user avatar

15 30 50 per page
1
2 3 4 5 6