se;ection selector in react code example
Example 1: select the items from selectors in .map reactjs
{this.props.categories.map((items , index)=>{
<option key{index}>{items.categoryName} </option>
})}
Example 2: react select options
import React, { Component } from 'react'
import Select from 'react-select'
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
]
const MyComponent = () => (
<Select options={options} />
)