Skip to content

Instantly share code, notes, and snippets.

@hboylan
Created June 21, 2021 19:48
Show Gist options
  • Save hboylan/beff84bf6f6e4c3ead397c89641e8a03 to your computer and use it in GitHub Desktop.
Save hboylan/beff84bf6f6e4c3ead397c89641e8a03 to your computer and use it in GitHub Desktop.
// Custom options prop adds unnecessary complexity
<Select
options={[
{
title: 'One',
value: 'one',
},
{
title: 'Two',
value: 'two',
},
{
title: 'Three',
value: 'three',
},
]}
value="one"
/>
// Instead, just rely on standard options
<Select value="one">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</Select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment