reactjs - RSC are rendered on the browser sometimes in the prod for nextjs - Stack Overflow

admin2025-04-18  2

Sometimes RSC are rendered on the browser not the html tags in nextjs config.

Not sure why this is happeneing. This is only happening in prod I am fetching the data from dynamo. My code is hosted on ecs with loadbalancer and caching on cloudfront.

    const data = await fetchData("page", "homepage");

  if (!data || data.error) { // Handle potential errors
    return (
      <main>
        <div className="wrapper-fluid">
          <div className="wrapper-centered">
            <h1>Error Loading Home Page</h1>
            <p>{data?.error || "Failed to fetch content."}</p>
          </div>
        </div>
      </main>
    );
  }

转载请注明原文地址:http://anycun.com/QandA/1744919438a89483.html