Open debuggingfuture opened 5 years ago
@vincentlaucy will share on yarn workspaces & monorepo setup https://medium.com/wordquest-engineering/structuring-js-app-in-monorepo-yarn-workspaces-react-node-firebase-845e207a4314 @alincode will share writing more functional code in javascript
收 React Hooks 的演講嗎?我有一些奇怪的 hooks 可以講,但還沒寫投影片😂
@caasi sure! 非常歡迎而且不需要投影片,我們直接show code 😂
直接秀 code !那麼歡樂!好喔。
目前寫到一半的在: https://caasih.net/playground/useless, source
@vincentlaucy I would going to share seo solution when use Material-ui in nextjs
@qas612820704:
Your talk reminds me that we can treat actions as messages in OOP.
@caasi, can you tell me in detail? :)
A simplified User
class:
class User {
constructor(name) {
this.name = name;
}
name(v) {
this.name = v;
return this;
}
}
An User
reducer:
const USER_NAME = 'USER_NAME';
const Name = (name) => ({
type: USER_NAME,
name,
});
const initialState = {
name: '',
};
const reducer = (state = initialState, action = {}) {
switch(action.type) {
case USER_NAME: {
const { name } = action;
return { ...state, name };
}
default:
return state;
}
}
Their structure are almost the same. So if you dispatch actions by yourself, you can reuse reducers in any reducer. Just like you can delegate messages(call methods) to other objects in OOP paradigm.
日期 Date
20190520
地點 Location
場地 Venue
題目 Sessions