254 questions
0
votes
1
answer
109
views
React children ReactNode 'type' is undefined when parent (owner) is server component
I migrated my React component with nested children to NextJS. To know what kind of child it is and where to render it, I check its property type.displayName
In NextJS, having no experience with server ...
0
votes
0
answers
50
views
Metadata not rendering in server-side HTML for social media crawlers
I'm facing an issue with Next.js 15 where metadata defined in layout.tsx (using the Metadata API) is not included in the server-rendered HTML, causing social media crawlers (e.g., Twitter, Facebook) ...
0
votes
0
answers
89
views
Can't call protected routes from Laravel 12 using fetch in Server Component in Next.js 15
I am using Laravel sanctum SPA authentication and everytime I use axios with config of withCredentials:true and withXSRFToken:true and call protected routes from the laravel api, it works perfectly ...
0
votes
1
answer
116
views
Best pattern for fetching both from server and client in Next.js App Router (handling cookies, CSRF, headers)
In a Next.js App Router project (app/ directory), I’m trying to build a unified fetcher that can work both server-side and client-side, including correct handling of cookies, CSRF tokens, and headers.
...
0
votes
2
answers
79
views
React Render Prop Pattern with server and client components
I have a parent componet where I want to pass a specific button to a child component. this button needs an index from the child component to call the server function. But I get the following error: ...
0
votes
0
answers
13
views
The Content Loading time for a Next15 page is a bit longer than expected in Vercel preview build (2~7 sec)
Here's the relevant code for the long-loading page & related information:
page.tsx(app router) :
import CodeSnippet from "@/components/CodeSnippet";
import { Suspense } from "react&...
0
votes
0
answers
90
views
Streaming on Cloudfront with next 15 and suspense?
How do I enable streaming / ui loading for a nextjs application on cloudfront?
I have a simple next15 server-side page with a server component that should fetch data on every url query change, meaning ...
1
vote
1
answer
70
views
When to use the 'use server' directive
The example in https://react.dev/reference/rsc/server-components#async-components-with-server-components shows the following snippet:
// Server Component
import db from './database';
async function ...
1
vote
0
answers
26
views
components are forced to be a client components while they don't have any interactivity
I have Index component that has 3 components, Questions, Answers and Pagination:
"use client";
import { useLocale } from "next-intl";
import { useEffect, useState } from "...
0
votes
0
answers
139
views
Failed to fetch loading "GET" in my Next.js 15 app
I wanted to use Supabase for both auth and general database interaction in my Next.js 15 app, however when I navigate to some of my dynamic routes, and even some that aren't dynamic but still use ...
1
vote
0
answers
113
views
Struggling with React server components and improving LCP speed
I am struggling to improve my NextJS website performance since the Largest Contentful Paint element is loading too late. I understand why it is loading late, but I am not able to find a solution to ...
0
votes
1
answer
776
views
How to correctly get data from supabase?
I have created a table in supabase called blogposts, and have added couple of rows.
Here is what the columns look like:
id
title
description
date
views
readingTime
imageUrl
author
I have created ...
-3
votes
1
answer
1k
views
How to fix the Error: Route used `searchParams.priceTo`. `searchParams` should be awaited before using its properties
I have the same problem. Next.JS
I'm trying to get get parameters via an async request. but the console always displays this error
Already exhausted everything AI Chat
no one can give
Maybe you have ...
1
vote
0
answers
47
views
Why is dynamic API data rendering on the initial HTML response on network tab in browser for one page but not for another?
I am working on a Next.js application. I have two pages:
Hollywood Page: This page is server-rendered and adding all the meta information to the page.
export const metadata = {
// exporting meta ...
0
votes
0
answers
92
views
make swiper render on server
I'm using NextJS and i have a component that contains swiper, the swiper need interactions (JavaScript) to work such as button clicks..etc, is there any chance to make this component as server ...