Created
July 21, 2018 06:58
-
-
Save balazimichal/860ed2d4e626a13c83b5830236a17cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
const ExpenseList = (props) => ( | |
<div> | |
<h1>Expense List</h1> | |
{props.expenses.length} | |
{props.filters.text} | |
</div> | |
); | |
const mapStateToProps = (state) => { | |
return { | |
expenses: state.expenses, | |
filters: state.filters | |
} | |
} | |
const ConnectedExpenseList = connect(mapStateToProps)(ExpenseList); | |
export default ConnectedExpenseList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment