Skip to content

Instantly share code, notes, and snippets.

@eamonnboyle
Created February 22, 2021 15:31
Show Gist options
  • Save eamonnboyle/f49689ed321542b6937b34e155b30df3 to your computer and use it in GitHub Desktop.
Save eamonnboyle/f49689ed321542b6937b34e155b30df3 to your computer and use it in GitHub Desktop.
Weather App Tutorial - Separating Components - Location Search
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