Why Is -Diddeselectrowatindexpath Not Being Called

function not being called in the then section of Promise all

you shouldn't need the .then call since you are using async/await:

try {
await Promise.all([
this.fetchDataFromExchange(timeframes[1],false),
this.fetchDataFromExchange(timeframes[2],false),
this.fetchDataFromExchange(timeframes[3],false),
this.fetchDataFromExchange(timeframes[4],false)
]);
this.createConfluenceSummaryTable()
} catch (e) {
// something failed, check `e`
}

Your .then(console.log()) is also not correct - you need to pass a function in .then and not call it directly there: () => console.log(...).

Most likely one of your promises has an error which you can catch with a try/catch.

Web API not being called from angular

Looks like you are forgot to subscribe to:

this.stops$ = this.apiService.getStopStatistics(id);
this.list$ = this.apiService.getList(id, '3');

I think this.stops$ works for you because somewhere in the template you have async pipe(stops$ | async).

So try to do:

this.list$.subscribe(response => console.log(response));

after that request should sent

Function is not being called React native

The function setSTNo is expecting a parameter serviceTData which you are not passing down to it.
I'm guessing the serviceTData is one of your useState items and you want to call the function setSTNo whenever the serviceTData value is updated.

If so,

  1. You can remove the serviceTData from async function setSTNo (serviceTData) parameter list
  2. Add a useEffect to listen for the changes in the serviceTData item and then call the function setSTNo whenever the serviceTData is updated.
  3. remove the setSTNo function call from your API call then block.
 async function  setSTNo  ()  {
console.log("st No tryyy" )
try {
await AsyncStorage.setItem('STnumber', serviceTData.id);
setLaststNumber(serviceTData.id);
console.log("OLD st No" , LaststNumber);
} catch (e){
console.log("Error Part",e);
}
}

Then add a useEffect to listen to your serviceTData state.

useEffect(() => {
if(serviceTData)
setSTNo();
},[serviceTData]);

assuming the initial state of serviceTData is null.



Related Topics



Leave a reply



Submit