|
this.setState({latitude: position.coords.latitude}) |
There are two setState calls in a row, that could be combined into one:
this.setState({ latitude: position.coords.latitude, longitude: position.coords.longitude })
Depending on how React batches the setState calls, two setState calls could result in render() being called twice in a row, so having them combined into one would be more efficient in that case.