I encountered an issue with my project while attempting an Ajax request
[Warning] Using synchronous XMLHttpRequest on the main thread is now considered deprecated due to its negative impact on user experience.
function retrieveReviews() {
var reviewsData = $.ajax({
url: 'API/reviews.json',
async: false
}).responseJSON;
return reviewsData;
}
I am seeking alternative methods to prevent this error from occurring