diff --git a/README.md b/README.md index 49438cd8..0ff3ec66 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Please PR or [File an issue](https://github.com/sw-yx/react-typescript-cheatshee You can specify the type of props as you destructure them: ```tsx -const App = ({ message: string }) =>
{message}
; +const App = ({ message }: { message: string }) =>
{message}
; ``` Or you can use the provided generic type for functional components: