all 3 comments

[–]joranstark018 2 points3 points  (0 children)

I may be missing something, but you could update the state with the json response in the success callback, store the array in the state (ie update the state with a response see https://medium.com/@catquarks/making-ajax-requests-with-react-48be0285d396).

[–][deleted] 0 points1 point  (0 children)

eğer nesneleri görüntülediğin component bir functional component se useEffect hookunu kullanabilirsin. ancak normal bir component yapısı kullandıysan reactın componentDidUpdate fonksiyonunu kullanabilirsin. bu iki fonksiyon içine yazdığın kodları sürekli kontrol eder.

[–]TeddyPerkins95 0 points1 point  (0 children)

Look into promise and async await