Skip to content

Commit 5d44131

Browse files
author
Jakub Kohoutek
committed
Fix arrow functions notation in README
1 parent 7cc33f4 commit 5d44131

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ V Reactu se často používá alternativní způsob zápisu funkce, a to pomocí
119119
Tento kód je (až na malé rozdíly, ktefé pro teď ignorujeme) ekvivalentí zápisu výše.
120120

121121
```jsx
122-
const Search => () {
122+
const Search = () => {
123123
return (
124124
<div>Search</div>
125125
);
@@ -129,13 +129,13 @@ const Search => () {
129129
Zanořování (skládání) komponent:
130130

131131
```jsx
132-
const SearchButton => () {
132+
const SearchButton = () => {
133133
return (
134134
<button><i className="search-icon" />Search</button>
135135
);
136136
}
137137

138-
const Search => () {
138+
const Search = () => {
139139
return (
140140
<input placeholder="search" />
141141
<SearchButton />
@@ -451,7 +451,7 @@ this.state = {loading: true};
451451
*hook*
452452

453453
```jsx
454-
const Search => () {
454+
const Search = () => {
455455

456456
const [searchText, setSearchText] = useState('abc');
457457

0 commit comments

Comments
 (0)