About 190,000 results
Open links in new tab
  1. How to export an array of objects that dynmically loaded in react

    Jul 6, 2021 · You'll want to return a React element instead of an array. If you meant to have an array of items then you'll want to declare it like this: export const items: Item[] = []

  2. javascript - export array with Hooks in React - Stack Overflow

    Sep 18, 2020 · I am trying to export an array I am generating in a function, so that I can use it in my main component. I have the following code :- ChildComponent:- import { useState, useEffect } from 'react'; ...

  3. export array as Component prop using React - Stack Overflow

    Jan 29, 2016 · I am wondering if there is a way to have an array of React elements in one file and then export that for import into another file with props? Something like... import MenuItem from 'material-ui/lib/menus/menu-item'; exports.menuItems = [ <MenuItem primaryText='Make glue' onTouchTap={this.props.makeGlue}/>, //<-- I am guessing props cannot be ...

  4. reactjs - How to export multiple arrays - Stack Overflow

    Feb 17, 2020 · if I have two arrays how do I export them for example: const a=['a','b','c'] const b=['1','2','3'] export default a,b?

  5. Export a dynamic array from a React component to another component

    Dec 5, 2017 · I built a react component that imports a Json file into an array to map the result. I need that array in another component. I don't know if I must built this component inside the new component or if there's a method to export the needed array (data).

  6. React: How to Render an Array of Objects (Full Example)

    In React, the most popular way to render an array of objects is to use the Array.map() method. This method calls a function once for each element in the array: {items.map((item) => {/*...

  7. Use the Map () Function to Export JavaScript in React

    Feb 13, 2023 · You will discover how to use and export the map() function in this manual. Use the map() method to cycle through an array and modify or update the data elements.

  8. How to render array of components in React | CodingDeft.com

    Apr 7, 2023 · Tutorial on how to create an array of components and render them, Also discuss how to store components in an array and render them.

  9. How to render an array of components in React

    Jul 14, 2021 · To render an array of components in React you simply need to pass the array into JSX by wrapping it in curly braces, just be sure that your components each have a unique key prop because React will use this when rendering it to avoid bugs.

  10. How To Render An Array Of Objects In ReactJS? - GeeksforGeeks

    Apr 12, 2025 · The most common and recommended way to render an array of objects in React is by using the Array.map method to iterate through the array. This approach involves creating an unordered list (<ul>) and rendering each object as a list item (<li>).

  11. Some results have been removed
Refresh