Commit Graph

14 Commits

Author SHA1 Message Date
Delba de Oliveira c2b4c0815c Unify caching story across the docs (#90149)
This PRs unifies the caching story across the docs, making Cache
Components the happy path, while still providing guidance to users in
the old model. However, instead of explaining the old model and its
caching layers, we've created a new guide focusing on what APIs to use
and when.

This follow-up PR aligns terminology across the docs:
https://github.com/vercel/next.js/pull/90589

## IA updates

Getting Started section: 

- Improves Getting Started progression:
- **Before:** CC → Fetching Data → Updating Data → Caching and
Revalidating (old and new model mixed)
- **After:** Fetching Data (Dynamic) → Mutating Data (Dynamic) → Caching
with CC (Prerendering) → Revalidating with CC.
- New: `caching.mdx` (CC-first)
   - Structure: 
      - Enabling Cache Components
      - Data vs UI-level caching
      - Working with request time APIs
      - Passing request values to cached functions
      - Working with non-deterministic operations
      - Working with synchronous operations
      - How rendering works (PPR and static shell story)
- New: `revalidating.mdx` (CC-first)
   - Explains how to use `cacheLife` and `cacheTag`

Guides Section: 

- New: `caching-and-revalidating.mdx` (Previous Model)
- For users who are not using CC, includes `fetch` options and route
segment config
- Moves route segment config options that don't apply to CC from API
reference to this guide (for easy archiving in the future).
- New: `migrating-to-cache-components.mdx` (WIP)
- Del: `caching.mdx` 😌 

## Terminology

We should remove caching layers from the docs. Users only needed to be
exposed to them when they were configured independently, but the new CC
APIs work across layers.

To make it easier to review this PR, I'm consolidating terminology and
fixing broken links in a new PR:
https://github.com/vercel/next.js/pull/90589

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
2026-03-03 13:14:24 +00:00
Delba de Oliveira 354b255d91 docs: Move Sass and CSS-in-JS pages to guides (#78536) 2025-04-25 08:16:35 -05:00
Delba de Oliveira 76ade73def docs: Move optimizing pages to guides (#78500) 2025-04-24 13:40:54 -05:00
Sam Ko 8dd0b56fb6 docs(errors): update suppressHydrationWarning section (#76521)
## Why?

We should clarify that React will **not** attempt to patch mismatched text content when using `suppressHydrationWarning`.

- Related: https://github.com/reactjs/react.dev/pull/7651
- x-ref: https://github.com/vercel/next.js/discussions/75890
2025-02-26 12:11:59 -08:00
Jam Balaya e5ce54de0b docs: use relative urls (#72941)
## Description
Follow up #52038.
Remove `https://nextjs.org` from URL in [error
pages](https://github.com/vercel/next.js/tree/canary/errors).

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2024-11-19 08:58:29 +00:00
Mayur fbb3a766e7 Update Cloudflare Auto Minify link due to feature deprecation (#72417)
This PR updates the link for the Cloudflare Auto Minify feature, as it
has been deprecated. Cloudflare now recommends disabling this feature to
avoid potential issues. The link and related references have been
modified to reflect this update and ensure accurate information for
users.

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2024-11-07 08:52:56 +00:00
Valentin Hervieu 203f6a8691 Update react-hydration-error.mdx (#63455)
Adding a very common cause for hydration errors

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-03-19 21:41:28 +00:00
Peter Briggs 2c9af97a35 docs: fix punctuation (#63223)
The word "etc." is always spelled with a period.

Co-authored-by: Steven <steven@ceriously.com>
2024-03-13 10:09:25 -04:00
Murat Ogulcan Sahin e7589e05db docs:Add react hydration error case. (#59147) 2023-12-02 08:35:22 +00:00
Li Ming 16a5aa74d0 feature: Update cases in [Incorrect nesting of HTML tags] (#53282)
It took me much time to debug this issue during my development process, and since the error logs(you can see below) given are not very clear, I hope it will help others who encounter the same problem.

<img width="954" alt="image" src="https://github.com/vercel/next.js/assets/1228449/69fd949e-f396-44e3-833c-8e7bbf080492">

ref: 
- [Are you allowed to nest a link inside of a link?](https://stackoverflow.com/questions/9882916/are-you-allowed-to-nest-a-link-inside-of-a-link)
- [Interactive Content](https://html.spec.whatwg.org/#interactive-content-2)
<img width="1283" alt="image" src="https://github.com/vercel/next.js/assets/1228449/db864080-14fd-45e1-9468-54365c6afddc">


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-07-28 18:12:15 +00:00
Anthony Shew b89424e461 docs: Add missing closing tag for react hydration error message. (#52607) 2023-07-13 00:22:10 +02:00
Victor Machado 8360ca0332 docs: add CDN optimization as possible hydration error cause (#52489)
At my work, we use Cloudflare as our CDN, and it has various optimization options for the served code including the "Auto Minify" feature that can minify JS, HTML and CSS to reduce download speed. After months of trying to update React to version 18, I have finally found out that the "Auto Minify" was the root cause of the problem, not anything in our code such as invalid tag nesting or printing dates. Because of that, I thought it would be helpful to add CDN as a possible place for investigating hydration errors.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-07-10 16:09:12 +00:00
Lee Robinson 4f8f9ae5b0 docs: Improve hydration mismatch error guide. (#52481) 2023-07-09 20:41:42 -07:00
Delba de Oliveira 44d1a1cb15 docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00