摘要: react-redux.js: import React, { Component } from 'react'import PropTypes from 'prop-types' export const connect = (mapStateToProps, mapDispatchToProps 阅读全文
posted @ 2024-03-18 09:39 mounter爱学习 阅读(55) 评论(0) 推荐(0) 编辑
摘要: App.js: import React, { Component } from 'react';import PropTypes from 'prop-types'import Header from './Header' function createStore (reducer) { let 阅读全文
posted @ 2024-03-18 09:39 mounter爱学习 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1.结合 context 和 store import React, { Component } from 'react';import PropTypes from 'prop-types' function createStore (reducer) { let state = null con 阅读全文
posted @ 2024-03-18 09:39 mounter爱学习 阅读(6) 评论(0) 推荐(0) 编辑