skip to Main Content

how to mapping through nested multi dimensional array and convert into new response – Reactjs

Hello friends let say i have nested data below const payload = [ { title: "ADDITIONAL", data: [ { documentCategory: "ADDITIONAL", documentCode: "CUSTOMER_CLAIM_FORM", documentKey: "customer/9fdf7ca8-4251-41c8-9116-6d006fa64aea/800123000004054/LIFESAVER_DEATH/LIFESAVER_DEATH_CUSTOMER_CLAIM_FORM_ca2b0204-b8c4-42f7-b059-580818789a64.jpg" }, { documentCategory: "ADDITIONAL", documentCode: "POWER_OF_ATTORNEY", documentKey: "customer/9fdf7ca8-4251-41c8-9116-6d006fa64aea/800123000004054/LIFESAVER_DEATH/LIFESAVER_DEATH_POWER_OF_ATTORNEY_6de88371-c666-4ce5-87f2-8aedf778f4c4.jpg" }, { documentCategory: "ADDITIONAL", documentCode: "POLICE_RECORD", documentKey:…

VIEW QUESTION

CORS ISSUE trying to send data to my server – Reactjs

"Access to XMLHttpRequest at 'http://localhost:3000/campgrounds/6411f03e718f68104cac045a' (redirected from 'http://localhost:5000/campgrounds') from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." This is my code on…

VIEW QUESTION

How to change the path when NavLink is active – Reactjs

<NavLink className={({ isActive }) => (isActive ? "isActive" : "isNotActive")} to={"artist/" + currentMotive.artist.slug.current} key={currentMotive.artist.slug.current}> {currentMotive.artist.name} </NavLink> How can I change the attribute to in the same way as className? Like: to={({ isActive }) => isActive ? "/motive/" + currentMotive.slug.current :…

VIEW QUESTION
Back To Top
Search