I am working on react native with javascript, where I want to execute a python script. I want to use this code in there:
return $.ajax({
type: 'GET',
url: 'test.py',
success: function(response) {
console.log(response);
},
error: function(response) {
return console.error(response);
}
});
But I get the error that the code is unreachable. For some reason react native can't use ajax. Do you know how I use ajax correctly in react native?