Skip to content

unnecessary renders caused by marker? #34

@ckalas

Description

@ckalas

I draw a bunch of markers into my map, each marker is just some simple svg shapes. When I inspect it in react tools it appears to be rerendering the markers and hence the map when I mouse over the marker area. At the moment I only have a handful of markers but when its in production it will have siginficantly more and I am trying to understand the reason behind it rerendering.

Even if BasicMarker just renders a div with static text it is rerendering.

<GoogleMap center={ {lat: 31.299, lng: 120.5853} } zoom={8}> {value.map(c => <BasicMarker key={c.lat.toString() + c.lon.toString()} text={""} lat={c.lat} lng={c.lon} />)} </GoogleMap>

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