File tree 2 files changed +4
-4
lines changed
docs/basic/getting-started
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -189,10 +189,10 @@ type AppProps = {
189
189
// Easiest way to declare a Function Component; return type is inferred.
190
190
const App = ({ message }: AppProps ) => <div >{ message } </div >;
191
191
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
193
193
const App = ({ message }: AppProps ): React .JSX .Element => <div >{ message } </div >;
194
194
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
196
196
const App = ({ message }: { message: string }) => <div >{ message } </div >;
197
197
198
198
// Alternatively, you can use `React.FunctionComponent` (or `React.FC`), if you prefer.
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ type AppProps = {
14
14
// Easiest way to declare a Function Component; return type is inferred.
15
15
const App = ({ message }: AppProps ) => <div >{ message } </div >;
16
16
17
- // you can choose annotate the return type so an error is raised if you accidentally return some other type
17
+ // You can choose to annotate the return type so an error is raised if you accidentally return some other type
18
18
const App = ({ message }: AppProps ): React .JSX .Element => <div >{ message } </div >;
19
19
20
- // you can also inline the type declaration; eliminates naming the prop types, but looks repetitive
20
+ // You can also inline the type declaration; eliminates naming the prop types, but looks repetitive
21
21
const App = ({ message }: { message: string }) => <div >{ message } </div >;
22
22
23
23
// Alternatively, you can use `React.FunctionComponent` (or `React.FC`), if you prefer.
You can’t perform that action at this time.
0 commit comments