-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: usePrevious #154
feat: usePrevious #154
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/umijs/hooks/fhk8hrd35 |
src/usePrevious/demo/demo1.tsx
Outdated
const [count, setCount] = useState(0); | ||
const previous = usePrevious(count); | ||
|
||
console.log('in demo', previous); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console 没啥用
src/usePrevious/demo/demo2.tsx
Outdated
setState(s => ({ ...s, name: nameInput })); | ||
}} | ||
> | ||
{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前后两个空格,没用吧~
src/usePrevious/index_cn.mdx
Outdated
); | ||
``` | ||
|
||
### 结果 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其他中文文档这里都是 Result 和 Params。哈哈,感觉你被 卡晨 坑了~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.