Skip to content

Commit 92a9fc7

Browse files
authored
docs: add ESLint rule exception for react/no-children-prop (#1413)
* Making docs more robus I ran into some errors caused by ESLint and I have found that a few other people did too, I think it would be good to include this in the docs. * Wording change for linting issues
1 parent daa0112 commit 92a9fc7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/framework/react/guides/basic-concepts.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ Example:
7878
)}
7979
/>
8080
```
81+
If you run into issues handing in children as props, make sure to check your linting rules.
82+
83+
Example (ESLint):
84+
```json
85+
"rules": {
86+
"react/no-children-prop": [
87+
true,
88+
{
89+
"allowFunctions": true
90+
}
91+
],
92+
}
93+
```
94+
8195

8296
## Field State
8397

0 commit comments

Comments
 (0)