Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.