I have an issue with @turf/turf the last version, in my react native app
"react-native": "0.58.0",
"@turf/turf": "^5.1.6"
I just followed the same example in the README.md but it's not working with me anymore.
The issue is when I import turf like this
import * as turf from '@turf/turf';
and write the function here is
handleNearby = () => {
const { region, providers } = this.state;
let currentPoint = [region.longitude, region.latitude]
let points = _.map(providers, p => {
console.log('@p', p);
const to = [p.coordinates.longitude, p.coordinates.latitude];
const distance = turf.distance(currentPoint, to, { units: 'kilometers' });
return { coords: p.coordinates, name: p.username, id: p.id, distance }
});
const sortPoints = _.sortBy(points, ['distance']);
this.setState({ sortedMarkers: sortPoints });
console.log('@#points', sortPoints);
return;
}
and run the app I have this error
attempting to a configurable attribute of a configurable property
But when I run the debugger on the browser the app is work very well I don't know why! any help?