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

web_basicの内容を追加 #129

Merged
merged 12 commits into from
May 11, 2024
Merged

web_basicの内容を追加 #129

merged 12 commits into from
May 11, 2024

Conversation

nokhnaton
Copy link
Contributor

No description provided.

@nokhnaton nokhnaton marked this pull request as draft April 24, 2024 07:30
@nokhnaton nokhnaton self-assigned this May 11, 2024
@nokhnaton nokhnaton requested a review from cp-20 May 11, 2024 02:24
@nokhnaton nokhnaton marked this pull request as ready for review May 11, 2024 02:24
const res = await fetch("{あなたのURL}/json", { method: "GET" })
const data = await res.json()
// 受け取ったdataをHTMLにセットする処理
}
```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ここらへん、thenを使うことにしてたはず。去年の話ではあるけど
https://q.trap.jp/messages/728565e0-3ed3-4644-b949-c613a6e5ec3d

Copy link
Contributor

Choose a reason for hiding this comment

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

thenの方が直感的、ほんまか?と言う気が若干

Copy link
Contributor Author

Choose a reason for hiding this comment

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

まあ、単語としてはthenの方がわかりやすいとは思う。awaitはともかく、asyncはなんで付けるのかよくわからんみたいになることもありそうだし。
とはいえ俺も別にどっちてもいいとは思うし、変えてもいいと思ってる。
一応去年こんな感じのやり取りがあったってだけ共有

Copy link
Member

Choose a reason for hiding this comment

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

初学者にPromiseの概念は難しすぎると考えて上のような結論に至ってます

おまじない避けたいと言うのもある

Copy link
Member

Choose a reason for hiding this comment

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

しかもこれ01ということを考えるとasync/awaitを持ってくるには早すぎる気がする(でもfetchは必要だし…)

Copy link
Contributor

@cp-20 cp-20 left a comment

Choose a reason for hiding this comment

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

LGTM

@cp-20 cp-20 merged commit f961878 into main May 11, 2024
3 checks passed
@cp-20 cp-20 deleted the feat/add_web_basic branch May 11, 2024 11:04
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.

3 participants