@t1gor. REDUX. . , 10 ( , , , .., .., ) , , ,
...
...
- ( ) -
- The great grandson - also reads the same citizens of the state level, without passing ...
Typically, the code looks something like this:
'use strict'
import { connect } from 'react-redux';
import AppView from './AppView';
const mapStateToProps = state => {
return {
someStateVar: state.something.capturedInState,
};
}
const mapDispatchToProps = dispatch => {
return {
customFunctionsYouCreate: () => {
},
};
}
export default connect(mapStateToProps, mapDispatchToProps)(AppView);
In short, you can store all the elements of the state level of the global application in something called storage, and whenever even the smallest component needs something from the state of the application, it can receive it when a view is created instead of being transferred.
source
share