Skip to content

Commit a762181

Browse files
committed
[React]: add missing props.children example
1 parent 4abb735 commit a762181

16 files changed

Lines changed: 3459 additions & 13 deletions

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ In questo repository puoi trovare buona parte del codice in cui si parla del lib
99

1010
## Esempi per categoria/capitolo
1111

12-
<table style="width: 100%">
13-
<tr>
14-
<td valign="baseline" width="50%">
12+
<table style="width: 100%"><tr><td valign="baseline" width="50%">
1513

1614
### React
1715

1816
- [React] [altri hook](/react/altri-hook)
1917
- [React] [key-attribute](/react/key-attribute)
2018
- [React] [&lt;Profiler /&gt;](/react/react-profiler)
2119
- [React] [use()](/react/use)
20+
- [React] [props.children](/react/props.children/)
2221

2322
#### Hooks
2423

@@ -34,8 +33,8 @@ In questo repository puoi trovare buona parte del codice in cui si parla del lib
3433
- [React] [useMemo()](/react/useMemo)
3534
- [React] [useCallback()](/react/useCallback)
3635
- [React] [useId()](/react/useId)
37-
</td>
38-
<td valign="baseline">
36+
37+
</td><td valign="baseline">
3938

4039
### Next.js
4140

@@ -50,11 +49,9 @@ In questo repository puoi trovare buona parte del codice in cui si parla del lib
5049
- [Next] [page not found](/next.js/page-not-found)
5150
- [Next] [parallel-routes](/next.js/parallel-routes)
5251
- [Next] [route-groups](/next.js/route-groups)
53-
- [Next] [server-actions](/next.js/server-actions)</td>
54-
</tr>
55-
<tr>
56-
<td valign="baseline" width="50%">
57-
<img width="441" height="1">
52+
- [Next] [server-actions](/next.js/server-actions)
53+
54+
</td></tr><tr><td valign="baseline" width="50%"><img width="441" height="1">
5855

5956
### JavaScript
6057

@@ -86,6 +83,6 @@ In questo repository puoi trovare buona parte del codice in cui si parla del lib
8683
- [State Management] [rendering list](/state-management/rendering-list)
8784
- [State Management] [zustand](/state-management/zustand)
8885
- [State Management] [zustand no store actions](/state-management/zustand-no-store-actions)
89-
- [State Management] [zustand immer](/state-management/zustand-immer)</td>
90-
</tr>
91-
</table>
86+
- [State Management] [zustand immer](/state-management/zustand-immer)
87+
88+
</td></tr></table>

react/props.children/.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

react/props.children/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

react/props.children/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# props.children
2+
3+
- [torna alla home](/)
4+
5+
## Come fare...
6+
7+
```
8+
npm install
9+
npm run dev
10+
```

react/props.children/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)