Axios post not working react native
2. Enable CORS using npm package. This is another way to enable CORS using the npm package. We'll use cors npm package to do it. Run the following command to install the package. 1. npm i cors. After successful installation, we have to add it in server.js file and enable the CORS. 1.