Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const GitRepositorySearch = () => {
- const INITITAL = 'react'
- const [search, setSearch] = useState(INITITAL)
- return (
- <form onSubmit={evt => { evt.preventDefault(); setSearch(evt.target.search.value) }} >
- <input type='text' name='search' defaultValue={INITITAL} />
- <button type="submit">Submit</button>
- <GitRepositoryResults name={search}/>
- </form>
- )
- }
Add Comment
Please, Sign In to add comment