Closed ingridlar closed 4 years ago
I cloned your repository and ran the app, but couldn't reproduce your issue.
I had cloned before you commited your lastest code. Now I cloned again. Here is the solution:
this.state.
to myPlaces
at line 193 in App.js
.// before: {myPlaces.map(place => (
{this.state.myPlaces.map(place => (
data.json
to public
directory.data.json
, wrap value of id
with double quotes, e.g. "id": 1
to "id": "1"
What were the values of
myPlaces
andindex
at line 137?state.myPlaces.findIndex(e => e.id === key)
will return-1
if there is no element whoseid
property has value equal tokey
. Andstate.myPlaces[-1]
will returnundefined
.By the way as I mentioned you would be better to post this issue on google-map-react-examples.