Skip to content

Commit

Permalink
fixup! Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Silbermann committed Aug 14, 2023
1 parent 56031d9 commit f518c7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ const App = ({ message }: AppProps): JSX.Element => <div>{message}</div>;
// you can also inline the type declaration; eliminates naming the prop types, but looks repetitive
const App = ({ message }: { message: string }) => <div>{message}</div>;

// Alternatively, you can use `React.FunctionComponent` (or the shorthand `React.FC`), if you prefer.
// With latest React types (earliest is `@types/[email protected]`) and TypeScript 5.1. it's mostly a stylistic choice, otherwise discouraged.
// Alternatively, you can use `React.FunctionComponent` (or `React.FC`), if you prefer.
// With latest React types and TypeScript 5.1. it's mostly a stylistic choice, otherwise discouraged.
const App: React.FunctionComponent<{ message: string }> = ({ message }) => (
<div>{message}</div>
);
Expand Down

0 comments on commit f518c7c

Please sign in to comment.