Skip to content

Commit 27febb4

Browse files
committed
Update README.md
Fix Stateless Functional Components syntax - was previously renaming. Advice should probably be reviewed as now much more debatable which syntax is better.
1 parent 01d7ca6 commit 27febb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Please PR or [File an issue](https://github.com/sw-yx/react-typescript-cheatshee
7777
You can specify the type of props as you destructure them:
7878

7979
```tsx
80-
const App = ({ message: string }) => <div>{message}</div>;
80+
const App = ({ message }: { message: string }) => <div>{message}</div>;
8181
```
8282

8383
Or you can use the provided generic type for functional components:

0 commit comments

Comments
 (0)