react-redux
1.Actions import * as navigationActions from './navigation' ; import * as todosActions from './todos' ; export default {...navigationActions, ...todosActions}; 2.combineReducers() import { combineReducers } from 'redux' ; import navigation from './navigation' ; import todos from './todos' ; const rootReducer = combineReducers({ navigation, todos }); export default rootReducer; 3.Application state by configureStore() import { createStore } from 'redux' ; import reducers from '../reducers' ; export default function configureStore ( ) { const store = createStore(reducers); return store; } 4.mapStateToProps & mapDispatchToProps & bindActionCreators import { bindActionCreators } from 'redux' ; import { connect } from 'react-redux' ; class App extends Component { renderTodoList = ()=>{ //reder todo list return this .props.todos.map( (todo)=...
To get a clear idea of the lifecycle we will need to differentiate between the initial creation phase, where the component is created, and state and props changes triggered updates as well as the component unmoutings phase.
Initialization
State Changes
Props Changes
Unmounting