-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
263 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
20241121T225809--kdoc-301-なぜreact-queryを挟むのか__permanent.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
:properties: | ||
:ID: 20241121T225809 | ||
:mtime: 20241127233305 | ||
:ctime: 20241121225825 | ||
:end: | ||
#+title: KDOC 301: なぜReact Queryを挟むのか? | ||
#+date: [2024-11-21 Thu 22:58] | ||
#+filetags: :permanent: | ||
#+identifier: 20241121T225809 | ||
|
||
* この文書のステータス | ||
- 作成 | ||
- [X] 2024-11-22 貴島 | ||
- レビュー | ||
- [X] 2024-11-27 貴島 | ||
|
||
* 概要 | ||
フロントエンド開発において、HTTPリクエストのライブラリ ~axios~ を直接呼び出すようなことはしないことが多い。React Queryの ~useQuery~ 関数にコールバック関数を渡して、 ~useQuery~ を介してリクエストを行う。 | ||
|
||
そうする理由は何だろうか。 | ||
|
||
* 関連 | ||
なし。 |
23 changes: 23 additions & 0 deletions
23
20241121T230340--kdoc-302-react-queryによってapiリクエストをキャッシュする__permanent.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
:properties: | ||
:ID: 20241121T230340 | ||
:mtime: 20241127233327 | ||
:ctime: 20241121230353 | ||
:end: | ||
#+title: KDOC 302: React QueryによってAPIリクエストをキャッシュする | ||
#+date: [2024-11-21 Thu 23:03] | ||
#+filetags: :permanent: | ||
#+identifier: 20241121T230340 | ||
|
||
* この文書のステータス | ||
- 作成 | ||
- [X] 2024-11-22 貴島 | ||
- レビュー | ||
- [X] 2024-11-27 貴島 | ||
|
||
* 概要 | ||
React QueryはAPIリクエストのキャッシュを行う。同じパラメータの場合はキャッシュから取ってきたりする。また、変更があった要素だけ再レンダリングもできる。 | ||
|
||
直接axiosを呼び出すと毎回リクエストを飛ばすことになるだろう。リクエストの分遅くなるだけでなく、WEB APIサーバの負荷を高めることになる。 | ||
|
||
* 関連 | ||
- [[id:20241121T225809][KDOC 301: なぜReact Queryを挟むのか?]]。疑問の答えの1つ |
22 changes: 22 additions & 0 deletions
22
20241121T230434--kdoc-303-react-queryによって状態管理する__permanent.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
:properties: | ||
:ID: 20241121T230434 | ||
:mtime: 20241127233354 | ||
:ctime: 20241121230442 | ||
:end: | ||
#+title: KDOC 303: React Queryによって状態管理する | ||
#+date: [2024-11-21 Thu 23:04] | ||
#+filetags: :permanent: | ||
#+identifier: 20241121T230434 | ||
|
||
* この文書のステータス | ||
- 作成 | ||
- [X] 2024-11-23 貴島 | ||
- レビュー | ||
- [X] 2024-11-27 貴島 | ||
|
||
* 概要 | ||
React Query は外部リクエストに関する状態管理をする。外部リクエストは非同期に行われており、さまざまな状態がある。リクエスト中、リクエスト完了、読み込み中、読み込み完了など。それらを自らで実装する必要なく、効率的にやってくれる。 | ||
* 参考 | ||
- [[https://qiita.com/taisei-13046/items/05cac3a2b4daeced64aa][React Queryはデータフェッチライブラリではない。非同期の状態管理ライブラリだ。 #TypeScript - Qiita]] | ||
* 関連 | ||
- [[id:20241121T225809][KDOC 301: なぜReact Queryを挟むのか?]]。疑問の答えの1つ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
:properties: | ||
:ID: 20241122T231155 | ||
:mtime: 20241127233431 | ||
:ctime: 20241122231156 | ||
:end: | ||
#+title: KDOC 304: 加算と乗算どちらが早いか? | ||
#+date: [2024-11-22 Fri 23:11] | ||
#+filetags: :permanent: | ||
#+identifier: 20241122T231155 | ||
|
||
* この文書のステータス | ||
- 作成 | ||
- [X] 2024-11-23 貴島 | ||
- レビュー | ||
- [X] 2024-11-27 貴島 | ||
|
||
* 概要 | ||
|
||
Goランタイムのコードで、同じ値を足して2倍にしている箇所がある。2倍にするとき、同じ値を足すのを不思議に感じた。加算のほうが早いということはありうるだろうかと考えた。 | ||
|
||
#+begin_src git-permalink | ||
https://github.com/kd-collective/go/blob/493edb29735fd2adf2087b32c60617dad11dc6e1/src/runtime/slice.go#L291 | ||
#+end_src | ||
|
||
#+RESULTS: | ||
#+begin_src | ||
doublecap := newcap + newcap | ||
#+end_src | ||
* 関連 | ||
なし。 |
83 changes: 0 additions & 83 deletions
83
20241123T022106--kdoc-306-カタカナで認識していると定着しない__draft_essay.org
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.