Created
February 22, 2021 15:31
-
-
Save eamonnboyle/f49689ed321542b6937b34e155b30df3 to your computer and use it in GitHub Desktop.
Weather App Tutorial - Separating Components - Location Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import {FC, useState} from "react"; | |
export const LocationSearch: FC = () => { | |
return ( | |
<div> | |
<label> | |
Add Location | |
<input className="ml-1 mr-1" type="text" value={locationSearch} | |
onChange={e => setLocationSearch(e.target.value)}/> | |
</label> | |
<button className="btn btn-primary" | |
onClick={addLocation} disabled={disableSearch}>Search</button> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment