T
getUserCoordinates уже и так асинхронная
но вообще это уже в @js_ru / @js_noobs_ru лучше или в личке
Size: a a a
T
I
BS
АГ
BS
T
T
const getUserCoordinates = () => {
return new Promise((resolve, reject) => {
let res = null;
RNLocation.configure({
distanceFilter: 5.0
});
const granted = RNLocation.requestPermission({
ios: 'whenInUse',
android: {
detail: 'fine'
}
});
if (granted) {
RNLocation.subscribeToLocationUpdates(locations => {
res = {
lat: locations[0].latitude,
lon: locations[0].longitude,
};
setUserCoordinates(res);
resolve(res);
});
} else {
setOrderType('rating');
reject(null);
}
});
};
I
I
const getUserCoordinates = () => {
return new Promise((resolve, reject) => {
let res = null;
RNLocation.configure({
distanceFilter: 5.0
});
const granted = RNLocation.requestPermission({
ios: 'whenInUse',
android: {
detail: 'fine'
}
});
if (granted) {
RNLocation.subscribeToLocationUpdates(locations => {
res = {
lat: locations[0].latitude,
lon: locations[0].longitude,
};
setUserCoordinates(res);
resolve(res);
});
} else {
setOrderType('rating');
reject(null);
}
});
};
АГ
I
МС
Unsupported top level event type "onGestureHandlerEvent" dispatched
в либе react-native-gesture-handler кто нибудь полюбому сталкивался, в гугле обсуждаемая тема сама подскажите ка крешить а то из гугла ничего нормального не нашелBS
T
BS
T
BS
BS
M