Skip to content

NeshanMap Component render just one time #1

@BasetMamshpoor

Description

@BasetMamshpoor

<NeshanMap
mapKey="KEY"
defaultType="neshan"
center={{ latitude: state.latitude, longitude: state.longitude }}
style={{ height: "90vh", width: "100%" }}
onInit={onInit}
zoom={12}>

as you see center prop base on state and when state change (setState by click on button) center of map not change
also in onInit function i have console.log('rendered') that write rendered just one time

is there any way to fix this problem?

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