初心者向けJWT講座:JSON Web Tokenを使った認証の仕組み

Development
Pipelines | Valibot
pipeline is a list of schemas and actions that synchronously passes through the input data.
Introducing Valibot, a 1kb Zod Alternative
A schema can be compared to a type definition in TypeScript. The big difference is that TypeScript types are "not executed" and are more or less a DX feature. A schema on the other hand, apart from the inferred type definition, can also be executed at runtime to guarantee type safety of unknown data.
Schema-driven Development
Schema-driven development means that teams only take a dependency on the actual API definition.
Bulletproof Typescript with Valibot · Flotes Blog
スキーマとは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
スキーマ - Wikipedia
Mental model
Valibot's mental model is mainly divided between schemas, methods, and actions. Since each functionality is imported as its own function, it is crucial to understand this concept as it makes working with the modular API design much easier.
Schemas are the starting point for using Valibot. They allow you to validate a specific data type, like a string, object, or date. Each schema is independent. They can be reused or even nested to reflect more complex data structures.
Methods help you either modify or use a schema.
Actions help you to further validate or transform a specific data type. They are used exclusively in conjunction with the pipe method, which extends the functionality of a schema by adding additional validation and transformation rules.
React v19 Discussion · react-hook-form · Discussion #11832
誤解されがちなnever型の危険性: 「存在しない」について #TypeScript - Qiita
クッキーとセッションを雰囲気で使っているエンジニアが、違いを説明できるようになる記事
Cannot use hooks in server components · Issue #52566 · vercel/next.js
hooks are not allowed in server components as they run only once and don't run on the client (where hooks are supposed to be executed).
サーバコンポーネント – React
サーバコンポーネントはブラウザに送信されないため、useState のようなインタラクティブな API を使用できません。
React Server Components の “server” とはこの別の環境を指しています。サーバコンポーネントは、CI サーバでビルド時に一度だけ実行することも、ウェブサーバを使用してリクエストごとに実行することもできます。
What's a good way to extend Error in JavaScript?
class MyError extends Error { constructor(message) { super(message); this.name = 'MyError'; } }
メモリー管理 - JavaScript | MDN
プログラミング言語に関係なく、メモリーのライフサイクルはほぼいつも同じです。
必要なメモリーを割り当てる
割り当てられたメモリーを使用する(読み込む, 書き込む)
必要なくなったら、割り当てられたメモリーを解放する
Learn Vim
Making Sense of React Server Components • Josh W. Comeau
Server and client components in Next.js: when, how and why? - ByteMinds
'use client' ディレクティブ – React
ファイルのトップに 'use client' を加えることで、当該モジュールとそれが連動してインポートしている依存モジュールがクライアントコードであるとマーク
クライアントコンポーネントとは、レンダーツリーの中の、クライアントでレンダーされるコンポーネントです。
サーバコンポーネントとは、レンダーツリーの中の、サーバでレンダーされるコンポーネントです。
サーバコンポーネントにより、クライアントに送信され実行されるコードの量を減らすことができます。バンドルされてクライアントで評価されるのはクライアントモジュールだけです。
サーバコンポーネントにはサーバ上で実行されることに伴う利点があります。ローカルファイルシステムにアクセスでき、データフェッチやネットワークリクエストのレイテンシが低い可能性があります。
サーバコンポーネントからクライアントコンポーネントに渡される props の値は、シリアライズ可能 (serializable) である必要があります。
サーバコンポーネントはユーザによるインタラクションをサポートできません。イベントハンドラはクライアントで登録されトリガされる必要があるためです。
クライアントコンポーネントとは、レンダーツリーの中の、クライアントでレンダーされるコンポーネントです。
コンポーネントモジュールに 'use client' ディレクティブが含まれている場合、そのコンポーネントは必ずクライアントコンポーネントであることが保証されます。
こんなフィーチャーフラグは気をつけろ! - Secret Ninja Blog
【CSS】input type="file"は::file-selector-buttonでスタイルをつけよう - Qiita
Design Docs
“When should you make a design document? ... If the change is large/cross-cutting, eg. will be spread over multiple PRs”
Writing forces clarity of thought. Think through major technical challenges before writing code.
Design docs are lightweight planning documents written before implementing code to solicit feedback, derive alignment, and create documentation.
JavaScriptのカスタムエラーはこれでOK | Wantedly Engineer Blog
それは、コードをminifyしたときに this.name の内容も一緒に変化してしまうからです。
最初に示したコード例のように名前を文字列リテラルとして明示することで、minifyされずにエラー名を保持することができます。強い難読化の必要がなければ、エラー名はそのまま保持するほうがよいでしょう。
React Design Patterns: Instance Hook Pattern
攻撃して学ぶJWT【ハンズオンあり】 - Money Forward Developers Blog
一番分かりやすい OpenID Connect の説明 - Qiita
Configuration Migration Guide - ESLint - Pluggable JavaScript Linter
npx @eslint/migrate-config .eslintrc.json
Migrate to v9.x - ESLint - Pluggable JavaScript Linter
Make sure you upgrade to at least Node.js v18.18.0 when using ESLint v9.0.0.
Four new rules have been enabled in eslint:recommended:
Flat config. If you are using flat config, you can run npx eslint or eslint (if globally installed) and ESLint will assume you want to lint the current directory. Effectively, passing no patterns is equivalent to passing . .
アーキテクチャ設計の民主化とADR(Architectural Decision Records)による意思決定の未来 - Facilitating Software Architecture の読書感想文 - じゃあ、おうちで学べる
altディシジョンツリー | Web Accessibility Initiative (WAI) | W3C