downshift

React | Items.map is not a function

吃可爱长大的小学妹 提交于 2019-12-25 01:54:08
问题 I am using Downshift, in order to create a dropdown that displays some menu options. I created a reusable React component with downshift, but now I get this error: Uncaught TypeError: items.map is not a function at IconDropdown.react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement.react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement (index.jsx:29) Here is the code this error refers to: {isOpen ? ( <div className="dropdown-menu"> {items.map(item => ( // Specifically this map <button