Respuesta :
Where from origin 'null' has been blocked by cors policy and cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted, this error can occur in React when using the fetch API to make a request to an external API.
What is From Origin Null?
A null origin is another method for enabling global access to website resources, similar to wildcard origin. Null origin, however, permits access to the response if the Access-Control-Allow-Credentials header is set to true, unlike wildcard origin, which does not.
To fix the above error, you can try one of the following solutions:
Make sure that the URL you are trying to fetch is using a supported protocol (e.g. https) and that it is correctly formatted.
If the API you are trying to access supports CORS, make sure that it is configured to allow requests from your domain. This can typically be done by setting the Access-Control-Allow-Origin response header to the origin of your web page.
If the API does not support CORS or you are unable to configure it to allow requests from your domain, you can use a proxy server to make the request on behalf of your web page. This can be done by configuring the fetch API to use a proxy URL instead of the API URL, and setting the no-cors option in the request options.
For more information and detailed instructions on how to fix this error, you can refer to the CORS documentation for React and the fetch API.
Learn more about Protocol Scheme;
https://brainly.com/question/13267160
#SPJ1