-
Notifications
You must be signed in to change notification settings - Fork 147
/
Copy pathApp.js
37 lines (31 loc) · 814 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react'
import useGiphy from './useGiphy'
import Results from './Results'
import SearchForm from './SearchForm'
const App = () => {
const [{ status, results, error }, setSearchParams] = useGiphy()
return (
<main>
<h1>Giphy Search!</h1>
<SearchForm
onChange={setSearchParams}
initialSearchQuery="friend"
initialLimit={24}
/>
<Results items={results} status={status} error={error} />
<hr />
<p className="text-center">
This is the app for the{' '}
<a
href="https://github.com/benmvp/react-workshop"
target="_blank"
rel="noopener noreferrer"
>
React FUNdamentals Workshop with Ben Ilegbodu
</a>
.
</p>
</main>
)
}
export default App