I'm learning redux and see that the examples in the doc use connect
in this signature:
const VisibleTodoList = connect(
mapStateToProps,
mapDispatchToProps
)(TodoList)
But in other places from other repos I've also seen this-
@connect(mapStateToProps, mapDispatchToProps)
I get that there the same thing but how does the signature of a decorator work? It doesn't look like it's setting a variable to the result of the connect so where does the function of @connect
go to and get assigned to?