<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?
<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?