cedricdelpoux / cedricdelpoux/react-responsive-masonry

Making my NextJs application crash

Open
#148 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
455
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Hi ! Can anyone show me how the go through this error ? I'm using this package in a NextJs app and get this error :

React does not recognize the `columnsCount` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `columnscount` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Here's what the code looks like :

`
const MasonryImages = () => {

const [images, setImages] = useState([])

useEffect(() => {
fetch('/api/pets-images').then(async (response) => {
if (response.ok) {
const images = await response.json()
setImages((images as FileType[]).filter((file) => {
return imagesExtensions.includes(file.ext)
}))
}
})
}, [])

return (



{images.map((image) => {
return {image.name}
})}




Visitez notre animalerie



)
}`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.