Skip to content

Console error appeard scrolling a page with more than 10 images: Maximum update depth exceeded. #137

@ClaudiaCavalleri

Description

@ClaudiaCavalleri

Hi @geosigno, i have a problem while wrapping my Image component into simpleParallax tag.

Actually every image is rendered with the desired scroll effect, but an error shows up into the console, talking about an infinite loop into useEffect rendering. This error occours only for pages with 5 or 6 or more images (in one page I have 35 photos anche it throws 5,6,7 times the same error, adding one more error while scrolling the page).

The message is: "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."

I haven't found an explanation, I use it anyway because it works with the effect, but I'd like to have a clean code witout errors in the background.
Hope to find your help,
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions