Last active
November 6, 2018 23:43
-
-
Save dance2die/22913120840120043c2e13bad5b8c4f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const DownshiftContext = React.createContext(); | |
| export default () => ( | |
| <Downshift | |
| onChange={selection => alert(`You selected ${selection.value}`)} | |
| itemToString={item => (item ? item.value : "")} | |
| > | |
| {downshift => ( | |
| <DownshiftContext.Provider value={downshift}> | |
| <h2>Basic Example</h2> | |
| <div> | |
| <Basic {...downshift.getRootProps({ refKey: "innerRef" })} /> | |
| </div> | |
| </DownshiftContext.Provider> | |
| )} | |
| </Downshift> | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment