Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#TW Meetup #2 20190520 #32

Open
debuggingfuture opened this issue Mar 24, 2019 · 10 comments
Open

#TW Meetup #2 20190520 #32

debuggingfuture opened this issue Mar 24, 2019 · 10 comments

Comments

@debuggingfuture
Copy link
Contributor

debuggingfuture commented Mar 24, 2019

日期 Date

20190520

地點 Location

  • Taiwan

場地 Venue

  • AppWorks 4/F

題目 Sessions

  • in <<title>> @<> , with one-line to describe
@debuggingfuture
Copy link
Contributor Author

debuggingfuture commented Mar 24, 2019

@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

@debuggingfuture debuggingfuture changed the title #TW Meetup #9 20190401 (TBC) #TW Meetup #9 20190520(TBC) Apr 3, 2019
@debuggingfuture debuggingfuture changed the title #TW Meetup #9 20190520(TBC) #TW Meetup #9 20190520 May 7, 2019
@debuggingfuture debuggingfuture changed the title #TW Meetup #9 20190520 #TW Meetup #2 20190520 May 12, 2019
@caasi
Copy link

caasi commented May 12, 2019

收 React Hooks 的演講嗎?我有一些奇怪的 hooks 可以講,但還沒寫投影片😂

@debuggingfuture
Copy link
Contributor Author

@caasi sure! 非常歡迎而且不需要投影片,我們直接show code 😂

@caasi
Copy link

caasi commented May 13, 2019

直接秀 code !那麼歡樂!好喔。

目前寫到一半的在: https://caasih.net/playground/useless, source

@dreamline2
Copy link

@vincentlaucy I would going to share seo solution when use Material-ui in nextjs

@qas612820704
Copy link

Hello, I'm Lego.

Here is the code I shared yesterday.

Thanks, everyone. Such a nice place! :)

@debuggingfuture
Copy link
Contributor Author

debuggingfuture commented May 21, 2019

https://github.com/alincode/20190520-show-me-the-code by @alincode

@caasi
Copy link

caasi commented May 21, 2019

@qas612820704:

Your talk reminds me that we can treat actions as messages in OOP.

@qas612820704
Copy link

@caasi, can you tell me in detail? :)

@caasi
Copy link

caasi commented May 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants