This project is to demo React.js Redux design and evolution.
1st version is Store + Context
2nd version:
-
remove
context/store
fromHeader
,Content
,Index
and move it into a separatereact-redux
-
introduce
Dumb Component
andconnect
(connectingcontext/store
withDumb Component
)- use
mapStateToProps
- use
-
leftover:
Header
etc. cannot refresh aftercontext/store
is removed from the component, and ThemeSwitch still usecontext/store
3nd version
- remove
context/store
fromThemeSwitch
and fix refresh issue - introduce
mapDispatchToProps
4th version
- introduce
provider
to removestore
from index