diff --git a/.claude/agents/docs-reviewer.md b/.claude/agents/docs-reviewer.md
new file mode 100644
index 00000000..af0a856e
--- /dev/null
+++ b/.claude/agents/docs-reviewer.md
@@ -0,0 +1,28 @@
+---
+name: docs-reviewer
+description: "Lean docs reviewer that dispatches reviews docs for a particular skill."
+model: opus
+color: cyan
+---
+
+You are a direct, critical, expert reviewer for React documentation.
+
+Your role is to use given skills to validate given doc pages for consistency, correctness, and adherence to established patterns.
+
+Complete this process:
+
+## Phase 1: Task Creation
+1. CRITICAL: Read the skill requested.
+2. Understand the skill's requirements.
+3. Create a task list to validate skills requirements.
+
+## Phase 2: Validate
+
+1. Read the docs files given.
+2. Review each file with the task list to verify.
+
+## Phase 3: Respond
+
+You must respond with a checklist of the issues you identified, and line number.
+
+DO NOT respond with passed validations, ONLY respond with the problems.
diff --git a/.claude/settings.json b/.claude/settings.json
new file mode 100644
index 00000000..11140318
--- /dev/null
+++ b/.claude/settings.json
@@ -0,0 +1,32 @@
+{
+ "skills": {
+ "suggest": [
+ {
+ "pattern": "src/content/learn/**/*.md",
+ "skill": "docs-writer-learn"
+ },
+ {
+ "pattern": "src/content/reference/**/*.md",
+ "skill": "docs-writer-reference"
+ }
+ ]
+ },
+ "permissions": {
+ "allow": [
+ "Skill(docs-voice)",
+ "Skill(docs-components)",
+ "Skill(docs-sandpack)",
+ "Skill(docs-rsc-sandpack)",
+ "Skill(docs-writer-learn)",
+ "Skill(docs-writer-reference)",
+ "Bash(yarn lint:*)",
+ "Bash(yarn lint-heading-ids:*)",
+ "Bash(yarn lint:fix:*)",
+ "Bash(yarn tsc:*)",
+ "Bash(yarn check-all:*)",
+ "Bash(yarn fix-headings:*)",
+ "Bash(yarn deadlinks:*)",
+ "Bash(yarn prettier:diff:*)"
+ ]
+ }
+}
diff --git a/.claude/skills/docs-components/SKILL.md b/.claude/skills/docs-components/SKILL.md
new file mode 100644
index 00000000..4b75f27a
--- /dev/null
+++ b/.claude/skills/docs-components/SKILL.md
@@ -0,0 +1,518 @@
+---
+name: docs-components
+description: Comprehensive MDX component patterns (Note, Pitfall, DeepDive, Recipes, etc.) for all documentation types. Authoritative source for component usage, examples, and heading conventions.
+---
+
+# MDX Component Patterns
+
+## Quick Reference
+
+### Component Decision Tree
+
+| Need | Component |
+|------|-----------|
+| Helpful tip or terminology | `
Likes: {count}
+- {isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'} -
- {!isSubmitted && ( - - )} - {!isSubmitted && ( - - )} -
+
+
+
+
);
@@ -98,7 +98,7 @@ export default function Gallery() {
export default function Profile() {
return (
);
@@ -131,7 +131,7 @@ export default function TodoList() {
// This doesn't quite work!
@@ -160,7 +160,7 @@ export default function TodoList() {
<>
@@ -207,7 +207,7 @@ export default function TodoList() {
);
@@ -80,7 +80,7 @@ export default function App() {
function Profile() {
return (
);
@@ -118,7 +118,7 @@ Notice how this example is broken down into two component files now:
You may encounter files that leave off the `.js` file extension like so:
-```js
+```js
import Gallery from './Gallery';
```
@@ -198,7 +198,7 @@ export default function App() {
export function Profile() {
return (
);
@@ -286,7 +286,7 @@ export default function App() {
export function Profile() {
return (
);
@@ -354,7 +354,7 @@ export default function Gallery() {
export function Profile() {
return (
);
@@ -404,7 +404,7 @@ export default function Gallery() {
export default function Profile() {
return (
);
diff --git a/src/content/learn/index.md b/src/content/learn/index.md
index 15e3b286..ab1d12af 100644
--- a/src/content/learn/index.md
+++ b/src/content/learn/index.md
@@ -143,7 +143,7 @@ You can put more complex expressions inside the JSX curly braces too, for exampl
```js
const user = {
name: 'Hedy Lamarr',
- imageUrl: 'https://i.imgur.com/yXOvdOSs.jpg',
+ imageUrl: 'https://react.dev/images/docs/scientists/yXOvdOSs.jpg',
imageSize: 90,
};
diff --git a/src/content/learn/javascript-in-jsx-with-curly-braces.md b/src/content/learn/javascript-in-jsx-with-curly-braces.md
index 736065b0..94b943de 100644
--- a/src/content/learn/javascript-in-jsx-with-curly-braces.md
+++ b/src/content/learn/javascript-in-jsx-with-curly-braces.md
@@ -28,7 +28,7 @@ export default function Avatar() {
return (
);
@@ -41,7 +41,7 @@ export default function Avatar() {
-Here, `"https://i.imgur.com/7vQD0fPs.jpg"` and `"Gregorio Y. Zara"` are being passed as strings.
+Here, `"https://react.dev/images/docs/scientists/7vQD0fPs.jpg"` and `"Gregorio Y. Zara"` are being passed as strings.
But what if you want to dynamically specify the `src` or `alt` text? You could **use a value from JavaScript by replacing `"` and `"` with `{` and `}`**:
@@ -49,7 +49,7 @@ But what if you want to dynamically specify the `src` or `alt` text? You could *
```js
export default function Avatar() {
- const avatar = 'https://i.imgur.com/7vQD0fPs.jpg';
+ const avatar = 'https://react.dev/images/docs/scientists/7vQD0fPs.jpg';
const description = 'Gregorio Y. Zara';
return (
Photo
-Here's how these look as a tree:
+Here's how these look as a tree:
e.stopPropagation()}
/>
setIsActive(true)}
/>
);
@@ -103,7 +103,7 @@ export default function Gallery() {
function Image() {
return (
);
@@ -124,7 +124,7 @@ img { margin: 0 10px 10px 0; }
-* **During the initial render,** React will [create the DOM nodes](https://developer.mozilla.org/docs/Web/API/Document/createElement) for `| {food.name} | diff --git a/src/content/learn/state-a-components-memory.md b/src/content/learn/state-a-components-memory.md index 0efe1191..0637dd17 100644 --- a/src/content/learn/state-a-components-memory.md +++ b/src/content/learn/state-a-components-memory.md @@ -40,14 +40,14 @@ export default function Gallery() { Next