I am fetching data from API but it didn't work. It's giving me the error like " Access to fetch at 'http://muslimsalat.com/lahore/false/5.json?key=API_KEY' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. "
When i fetch data in react-native mobile then it worked but when i fetch data in react desktop then it is not working.
Can anyone tell me what is the reason for this error and how can i solve it?