如何在 React Component 以外获取 Redux Store

原文连接: Access the Redux Store Outside a React Componentjavascript 译者注: 获取 redux 中的 store 的方法是个不起眼的小知识点,最近也有个小需求要在普通函数中引用 redux 的 store,习惯了在组件中经过 connect mapStateToProps 获取 store 中的数据,在外部暴力引用 store 时油然生
相关文章
相关标签/搜索