@connect当我尝试访问 react 组件中的 store 时效果很好。但是我应该如何在其他一些代码中访问它。例如:假设我想使用授权令牌来创建可以在我的应用程序中全局使用的 axios 实例,实现这一目标的最佳方法是什么?
这是我的 api.js 
// tooling modules
import axios from 'axios'
// configuration
const api = axios.create()
api.defaults.baseURL = 'http://localhost:5001/api/v1'
api.defaults.headers.common['Authorization'] = 'AUTH_TOKEN' // need the token here
api.defaults.headers.post['Content-Type'] = 'application/json'
export default api
现在我想从我的商店访问一个数据点,如果我尝试在 React 组件中使用 @connect
// connect to store
@connect((store) => {
  return {
    auth: store.auth
  }
})
export default class App extends Component {
  componentWillMount() {
    // this is how I would get it in my react component
    console.log(this.props.auth.tokens.authorization_token) 
  }
  render() {...}
}
有什么见解或工作流程模式吗?