import React from 'react' import {connect} from 'react-redux' import { Redirect} from 'react-router-dom' import axios from 'axios' import {login} from './Auth.redux.js' //两个reducers 每个reducers都有一个state @connect( (state)=>state.auth, {login} ) class A
准备三个文件(封装请求函数),然后测试一下,能不能调用数据 第一个文件 request.js import 'whatwg-fetch'; /** * Parses the JSON returned by a network request * * @param {object} response A response from a network request * * @return {object} The parsed JSON from the request */ functio