score:2
Accepted answer
You would need to wrap the code inside that div in curly braces { } to be valid JSX. Just like you did with the first chunks.map.
return(
<div className="tile is-ancestor">
{chunks.map((chunk)=> {
return (
<div class="tile">
{
chunk.map((edge) => {
return(
<div className="tile is-parent is-4">
<div className={`tile is-child notification ${edge.node.frontmatter.type}`}>
<p className="is-7">{edge.node.frontmatter.date}</p>
<h2 className="subtitle is-5">{edge.node.frontmatter.title}</h2>
<p>{edge.node.excerpt}</p>
</div>
</div>
)
}
)
}
</div>
)
})}
</div>
);
Source: stackoverflow.com
Related Query
- map() method on multi dimensional array in gatsby/react, getting error while trying to wrap inner loop in div
- Why am I getting undefined error for map method while getting array as a prop?
- I am getting error while calling functions inside mapped array in React JS
- Getting error while trying to render array of object in react js
- Getting Typescript Error while adding object to array using useState in React
- Getting error while putting an array onto state - React
- I am getting this error "Cannot read properties of undefined (reading 'map')" when i use map method in my react app
- Getting unexpected token, expected "," while trying to map an array in React
- Getting error while using useDrag({}) method in react typescript with react-dnd
- I'm getting error like this while creating react app
- Azure App Service Getting error while deploying REACT JS application
- Keep getting error while creating react app
- Getting error "Path" argument must be string while deploying React - Loadable components sample code in cloud functions
- Getting an out of memory error while using Create React App and Plotly.js
- Getting an error that images is null while trying to show a preview of the uploaded images in react js
- Getting referrence error while creating new array of object from existing array of objects?
- Getting Error while uploading file to S3 with Federated Identity using aws-amplify in React
- How to add items into specific Id using the react array map method
- Using react polyfills but getting error Object doesn't support property or method 'repeat' in IE11
- Map method for multiple indexed array values for react
- Getting this error while using React router TypeError: type.toUpperCase is not a function
- React js, error about keys when map on array
- Getting a different port ERROR in the console while uploading image from the frontend using react js to the Mongo db
- Map method keeps returning an array of objects causing an errror in React
- Passing array to props but getting error while iterating
- Getting type error while running react app, TypeError: instance.render is not a function
- REACT : getting error while re-rendering components using setState hook
- React push object into array and map error map not a function
- Getting error while trying to loading a react-leaflet map
- getting an error while creating react app
More Query from same tag
- redux-actions Typescript declare an action
- Is there way to get return value from reducer action? (in React-Native)
- How to receive props from a parent component when using getStaticProps?
- How to avoid TypeError: Cannot read property 'charAt' of undefined when the json input is not available?
- Navigating (Routing) from one page to another in different folders in jsx Reactjs
- How to add dynamic code inside of a React Router Link component
- Implementing time delay using React Hooks
- React Testing: Cannot read property 'toLowerCase' of undefined
- Serving static files in "storybook js"
- React how to use data.props content to do conditional rendering
- Passing function parameter from App.js to Other component in React
- React and Tailwind CSS: dynamically generated classes are not being applied
- react-bootstrap-table-2 sortFunc is never called
- Accordion with checkbox in panel header
- change Material UI Typography into styled-component
- Getting local json data with reactjs
- Reactjs inheritance
- Solve pagination issues
- Setting active state on a Nav item depending on the Route using ReactBootstrap
- eventlistener beforeunload not working in react
- Are there any disadvantages in using lazy initialization for useState?
- React Manage Multiple Audios on Same Page and play one at a time using function based components
- How can get Value from child component in react?
- CSS: apply :focus style to unfocused element?
- ReactJS: Stateful children in stateless component
- Accessing JavaScript Object property dynamically during useState update
- How to change styles of a parent element of a <NavLink> tag in React.js?
- calling and pass arguments to children component's function from parent component in reactjs
- jq: 1 compile error jq: error: schedule/0 is not defined at <top-level>, line 1: .Christchurch.bus-schedule.from["Weekday"] |= . + ["1646"]
- React NavBar Component Prevent render