You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aefdc85
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -71,8 +71,8 @@ Spawn these agents IN PARALLEL using the Task tool. Each agent receives the skep
71
71
| test-explorer | Explore | Test files for usage patterns | Search `.claude/react/packages/*/src/__tests__/` for test files mentioning the topic. Extract actual usage examples WITH file paths and line numbers. |
72
72
| source-explorer | Explore | Warnings/errors in source | Search `.claude/react/packages/*/src/` for console.error, console.warn, and error messages mentioning the topic. Document trigger conditions. |
73
73
| git-historian | Explore | Commit messages | Run `git log --all --grep="<topic>" --oneline -50` in `.claude/react`. Read full commit messages for context. |
74
-
| pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R facebook/react --search "<topic>" --state all --limit 20`. Read key PR descriptions and comments. |
75
-
| issue-hunter | Explore | Issues showing confusion | Search issues in both `facebook/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. |
74
+
| pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R react/react --search "<topic>" --state all --limit 20`. Read key PR descriptions and comments. |
75
+
| issue-hunter | Explore | Issues showing confusion | Search issues in both `react/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. |
76
76
| types-inspector | Explore | Flow + TypeScript signatures | Find Flow types in `.claude/react/packages/*/src/*.js` (look for `@flow` annotations). Find TS types in `.claude/react/packages/*/index.d.ts`. Note discrepancies. |
77
77
78
78
### Step 3: Agent Prompts
@@ -164,8 +164,8 @@ CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in PRs.
164
164
165
165
Your task: Find PRs that introduced or modified <TOPIC>.
166
166
167
-
1. Run: gh pr list -R facebook/react --search "<topic>" --state all --limit 20 --json number,title,url
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-34Lines changed: 2 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,41 +38,9 @@ Ignore this if you're specifically describing `createElement`.
38
38
39
39
Ignore this if you're specifically writing about ES5.
40
40
41
-
#### Don't use ES6 features when equivalent ES5 features have no downsides.
41
+
#### Prefer readable syntax.
42
42
43
-
Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it.
44
-
45
-
In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature.
46
-
47
-
#### Don't use features that aren't standardized yet.
48
-
49
-
For example, **don't** write this:
50
-
51
-
```js
52
-
classMyComponentextendsReact.Component {
53
-
state = {value:''};
54
-
handleChange= (e) => {
55
-
this.setState({value:e.target.value});
56
-
};
57
-
}
58
-
```
59
-
60
-
Instead, **do** write this:
61
-
62
-
```js
63
-
classMyComponentextendsReact.Component {
64
-
constructor(props) {
65
-
super(props);
66
-
this.handleChange=this.handleChange.bind(this);
67
-
this.state= {value:''};
68
-
}
69
-
handleChange(e) {
70
-
this.setState({value:e.target.value});
71
-
}
72
-
}
73
-
```
74
-
75
-
Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text.
43
+
Choose syntax that makes each example easier to follow. Prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. Use arrow functions when they make callbacks easier to read. In class components, arrow functions can also preserve the component's `this` value.
0 commit comments