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

fix: 修改post请求方式 #78

Merged
merged 1 commit into from
May 17, 2020
Merged

fix: 修改post请求方式 #78

merged 1 commit into from
May 17, 2020

Conversation

hamono
Copy link
Member

@hamono hamono commented May 17, 2020

No description provided.

@hamono hamono merged commit b5b8077 into master May 17, 2020
hamono added a commit that referenced this pull request May 17, 2020
fix: 修改post请求方式 @b5b807747d5b1ba3b113408ee645be2a0f6eb9ba
return swr.revalidate();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [suppress, swr.revalidate]);
export default function usePost(Request: { path: string; request: object }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得使用hook去解决post问题,无异于杀鸡用牛刀,虽然也不是不行,但是觉得怪怪的,没有多大的必要性

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有下面这什么狗屎代码,你为什么要在我的屎上再糊一层屎?
把屎删掉从头写不香吗?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request为什么要用Pascal命名?禁止使用object/function作为类型,应该具体化,比如{},或是()=》void

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

Successfully merging this pull request may close these issues.

2 participants