A
A
Andrew2017-06-21 23:36:32
React
Andrew, 2017-06-21 23:36:32

How does the connect function from react-redux map data into props?

How does the connect function from react-redux map data into props? we cannot change them in the component, how then do they network?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Gushchin, 2017-06-22
@iNikNik

The provider passes the store through the context. The connect function creates an HOC that subscribes to store updates. Well, then your mapState, mapActions are called where you get the necessary data and map it into props

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question