Created
May 19, 2020 16:01
-
-
Save ozcanzaferayan/14a81dec387af26bee800ea2d21171b6 to your computer and use it in GitHub Desktop.
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 { useRecoilState } from "recoil"; | |
import { todoListFilterState } from "../state/atoms"; | |
export function TodoListFilters() { | |
const [filter, setFilter] = useRecoilState(todoListFilterState); | |
return ( | |
<> | |
<select value={filter} onChange={(e) => setFilter(e.target.value)}> | |
<option value="all">All</option> | |
<option value="completed">Completed</option> | |
<option value="uncompleted">Uncompleted</option> | |
</select> | |
<br /> | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment