Found my mistake:
i did several asychronous requests in a for loop. and in each loop I had an async/await case. The problem: the first successful await triggered the rerender. Solution: I put the for loop in a separate function which returns the end result of the for loop. Then await this function result in the main function.
i have a problem in ReactJS. I have an Array, which is filled:
const pickedAddresses = useSelector(state => state.map.pickedAddresses); // Redux Stateslice
console.log("AddressesArray:", pickedAddresses, "AddressesArray.length:", pickedAddresses.length);
returns:
AddressesArray: [] AddressesArray.length: 0
0: "Biberstraße 4, 50678 Köln, Deutschland"
1: "Alteburger Str. 40, 50678 Köln, Deutschland"
2: "Im Klapperhof 22-24, 50670 Köln, Deutschland"
3: "Kleiner Griechenmarkt 38, 50676 Köln, Deutschland"
4: "Sechtemer Str. 10, 50968 Köln, Deutschland"
length: 5
__proto__: Array(0)
I was trying to map over this Array, but nothing happens.
Anyone an idea?
Thank you.
In addition, the screenshot of my Redux State: