-
- [ ] Screen
- [ ] Buzz yourself (2 hours)
- [ ] A profile & list of profiles (swipe, end of the list?) (4 hours)
- [ ] If there is a new buzzer in the area (1 hour)
- [ ] Establishing a c…
-
1. 写一个自定义hooks,它的功能是:支持传入一个id,hook是内部通过接口`/api/online`可返回这个id的在线状态,最终返回当前id的在线状态
2. 例如`useState`实现一个简易版本的`useReducer`
-
# 一、[引入Hook背景](https://reactjs.org/docs/hooks-intro.html#motivation)
改善组件“代码复用”和“代码组织”;
## 1.1 更好的`逻辑复用`方案
- `render props`和`HOC`本质上是一样的,都是利用父子组件关系,把公共逻辑放入父组件里完成,即复用的逻辑必须依托一个组件,从DevTools可以到都到“wra…
-
https://github.com/AnthonyDugarte/github-search/blob/5b106294ae14104b5d241d7ce46252b116b5bf44/src/pages/index.tsx#L47
-
## In other to use functional components we have to follow the below step;
- We need to first of all create a functional components which is created as.
- In other of use react features in the f…
-
## Redux
Redux自体はstateを一括管理するライブラリ
必ずしもReactとセットなわけではない
大規模プロジェクトではメリット大(個人開発程度ならオーバーキル)
でも最近ではHooksが出てきて`useReducer` + `useContext`で賄うことが多い
### 参照
- [Redux公式](https://redux.js.org/)
- [Rea…
-
The app will need a few global states and actions that we need to reproduce using react context and hooks:
- Being able to display and hide a full screen loading from anywhere in the app
- On app st…
-
I think there might be a compilation issue before it was published. I get the following when I try to run it:
```
SyntaxError: /Users/xxxx/code/meerkat/meerkat-web/node_modules/aws-amplify-react-h…
-
Is there any good reason to call the `useState(() => ...)` feature "Lazy initial state"? The actual implementation is synchronous ("greedy") as far as I can tell, so I would propose to rename it to "F…
-
# An Easy Guide to React useReducer() Hook
How to use React useReducer() hook to manage complex state: initial state, action object, dispatch, reducer.
[https://dmitripavlutin.com/react-usereducer/]…