Skip to content

TypeError: Invalid attempt to destructure non-iterable instance > when adding markers #224

Closed
@jabusir

Description

@jabusir

Hi, I'm attempting to add markers to my map, but I keep getting this error when using the Marker component from react-simple-maps.

I have a functional component with a hook that is an array of objects, each with the property of "name", and "coordinates". In the return of my functional component, I map over the hook called markers, and return a Marker component for each with a key, and coordinates is set to marker.coordinates which has already been double checked to be an array of two numbers.

I've attached my code. Could really use some help thanks.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions