Javascript re-assign let variable with destructuring [duplicate]
Solution 1:
({ latitude, longitude } = props.userLocation.coords);
Destructuring needs to be either after a let
, const
or var
declaration or it needs to be in an expression context to distinguish it from a block statement.