
上QQ阅读APP看书,第一时间看更新
Creating sample data
Let's dispatch some actions and see what happens.
Add the following code at the end of the src/index.js file:
store.dispatch(createPost('dan', 'hello world'))
store.dispatch(createPost('des', 'second post'))
These two posts will be inserted into the Redux store and rendered by our render() function.