Search code examples
javascriptreactjsinternet-explorer-10jsx

Listing in React using array.map does not working in IE10


I have such code for rendering function:

render () {
  return (
    <div className='s-with-fancy-arrow'>
    <select className='city' onChange={this.change} value={this.state.selected}>
    {
      this.state.cities.map(function (city, index) {
        return <option key={'city-list-' + index} value={city.id}>{city.display_name}</option>
      })
    }
    </select>
    </div>
    );
}

In Internet Explorer 10 it rendered only like select in div without any options inside select.

How to solve this problem?


Solution

  • After hard searching in code we found a simple reason: using fetch and promise without polifills.