📌  相关文章
📜  redux dispatch input onchange - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:49.707000             🧑  作者: Mango

代码示例1
const SearchBar = ({ searchQuery }) => 
  
    
searchQuery(event.target.value)} placeholder="Search for items or sellers" />
const mapStateToProps = () => { return { } } const mapDispatchToProps = (dispatch) => { return { searchQuery: (val) => dispatch(searchQuery(val)) } } export default connect(mapStateToProps, mapDispatchToProps)(SearchBar);