I watched the Redux application on the Internet and saw the following code there:
function mapStateToProps(state) { const { value } = state.counter; return { value }; } export default connect(mapStateToProps)(ReduxCounter); ReduxCounter is a react-component. Memory prompts that in JS 2 the line is written in ECMA 6 and this is equivalent to:
const value = state.counter.value; but the question is in the returned result, which is also enclosed in curly braces return { value }; ??
And the second question - how to understand the record connect(mapStateToProps)(ReduxCounter) ? Interested in the sequence of actions in clear language.