Q:

proxy won't work in create-react-app and axios

I added "proxy": "http://localhost:3001" in package.json, and I run npm run start to start the client app.
then I do this with axios 
axios.get('/')
    .then(resp => {
      console.log(resp)
      this.setState({
        name: resp.name
      })
    })

I open the network tab I'm seeing it calls http://localhost:3000 not the proxy, any clue? I have an express server running on 3001.

A:

open the network tab I'm seeing it calls http://localhost:3000 not the proxy

That's how proxies work! The browser makes a request to localhost:3000 where your proxy server is running, which forwards the request to localhost:3001

