Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
React: can i use [array].map on inside of called function?

Hello i've array data like below and there is have complicated issue for me.

{data.menu.map((data2, i) => {
       menutitle:{data2.title}
                  })}

i need apply something like above to inside of "MasterBanner" but i dont know how can i do this.Someone Can help me ?

import MasterBanner from "./MasterBanner";
    const Data = [
  {
    bgcolorcode: "#482624",
    title: "",
    desc: "",
    link: "",
      menu:[{
          title:"Tshirt",
          img:"/images/home-banner/1.jpg"
      },
          title:"Tshirt",
          img:"/images/home-banner/1.jpg"
      }],
  },
  {
    bgcolorcode: "#858489",
    title: "",
    desc: "",
    link: "",
      menu:[{
          title:"Tshirt",
          img:"/images/home-banner/1.jpg"
      },
          {
              title:"Tshirt",
              img:"/images/home-banner/1.jpg"
          }],
  }
];

{Data.map((data, index) => {

        return (

          <MasterBanner
              key={index}
              desc={data.desc}
              title={data.title}
              link={data.link}
              img={data.img}
              bgcolorcode={data.bgcolorcode}

/I need to place nested array data(menu) to here/

          />

        )


      })}

EDITED:

Import Link from "next/link";
 import { Col, Container, Row } from "reactstrap";
 const MasterBanner = ({ img, menuimg, menutitle, title, desc, link, classes, btn, btnClass, bgcolorcode }) => {
 return ( 
html codes --its not ready--
 );
 }; 
export default MasterBanner;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

export default function MasterBanner(props) {
    const { data } = props
    return (
        {data.map(d) => (
            <div>{d.title}</div>
            ...
        )}
    )

}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!