世界上最伟大的投资就是投资自己的教育
React & Redux 实战 Reminder Pro 项目 免费视频教程
5 个视频
学完 Redux 基础课之后,再来学习 本套实战课程,一个小应用,却会利用到所有学到的 Redux 知识点,视频讲解了,如何在前端 cookies 中存储数据。
demo: https://mystifying-goodall-3138f9.netlify.com/
<link href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
src/index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App';
import registerServiceWorker from './registerServiceWorker';
import { composeWithDevTools } from 'redux-devtools-extension';
import { Provider } from 'react-redux';
import logger from 'redux-logger';
import { createStore, applyMiddleware } from 'redux';
import rootReducer from './reducers';
const store = createStore(
rootReducer,
composeWithDevTools(
applyMiddleware(logger)
)
);
ReactDOM.render(
<Provider store={ store }>
<App />
</Provider>,
document.getElementById('root')
);
registerServiceWorker();
src/components/App.js
import React, { Component } from 'react';
class App extends Component {
render() {
return (
<div className="App">
<div className="title">Reminder Pro</div>
<div className="form-inline">
<div className="form-group mr-2">
<input type="text" className="form-control" placeholder="I have to..." />
</div>
<button type="button" className="btn btn-success">Add Reminder</button>
</div>
</div>
);
}
}
export default App;
src/index.css
.App {
padding-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
}
.title {
text-align: center;
font-size: 26px;
}
src/reducers/index.js
const reminders = (state = {}, action = {}) => {
switch(action.type) {
default: return state;
}
}
export default reminders;
React & Redux 实战 Reminder Pro 项目免费视频教程 #1 项目免费视频教程搭建07:03
React & Redux 实战 Reminder Pro 项目免费视频教程 #2 显示列表09:45
React & Redux 实战 Reminder Pro 项目免费视频教程 #3 处理时间04:23
React & Redux 实战 Reminder Pro 项目免费视频教程 #4 删除 reminder05:57
React & Redux 实战 Reminder Pro 项目免费视频教程 #5 保存数据到 cookies(完结)04:36
0 条回复
暂无回复~~
▬▬▬▬▬▬ 联系我 👋 ▬▬▬▬▬▬
微信:qiuzhi99pro
b 站:https://space.bilibili.com/31152817
知乎:https://www.zhihu.com/people/rails365
Youtube:https://www.youtube.com/channel/UCA-Jkgr40A9kl5vsIqg-BIg
© 汕尾市求知科技有限公司 | Rails365 Gitlab | 知乎 | b 站 | csdn
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top