Skip to content

Commit 3aab2b1

Browse files
author
Danny Hurlburt
committed
Update README.md
1 parent 3894be7 commit 3aab2b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ type AppProps = {
189189
// Easiest way to declare a Function Component; return type is inferred.
190190
const App = ({ message }: AppProps) => <div>{message}</div>;
191191

192-
// you can choose annotate the return type so an error is raised if you accidentally return some other type
192+
// You can choose to annotate the return type so an error is raised if you accidentally return some other type
193193
const App = ({ message }: AppProps): React.JSX.Element => <div>{message}</div>;
194194

195-
// you can also inline the type declaration; eliminates naming the prop types, but looks repetitive
195+
// You can also inline the type declaration; eliminates naming the prop types, but looks repetitive
196196
const App = ({ message }: { message: string }) => <div>{message}</div>;
197197

198198
// Alternatively, you can use `React.FunctionComponent` (or `React.FC`), if you prefer.

0 commit comments

Comments
 (0)