Skip to content

Conversation

@schktjm
Copy link
Contributor

@schktjm schktjm commented Apr 14, 2025

関連URL

概要

過去3年間のPRをコメント数が多い順に90件集めてNotebookLMに取り込んで、ガイドラインを吐かせてみました。

https://notebooklm.google.com/notebook/cbdfddc8-1530-4eaf-8891-bf9824fcfff7?pli=1

実際に取り込んだPR一覧はこちら
https://gist.github.com/schktjm/f921219197762d7a7ebdaa9d38671228

変更内容

確認方法

@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 14, 2025

Open in StackBlitz

npm i https://pkg.pr.new/kufu/smarthr-ui@5549

commit: 89fc3a9

* **【避けるべきこと】** `new String()`, `new Boolean()`, `new Number()` のように `new` キーワードをプリミティブ型の生成に使用すると、意図せずオブジェクトが生成され、予期せぬ挙動や混乱を招くため避けてください。

* **コンポーネントのスタイリングと状態制御:**
* 【推奨】CSS クラスの適用は、CSS Modules やそれに類する仕組み(例: `styles` オブジェクト)を介して行ってください。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

これちょっと古い情報そう

* **【避けるべきこと】** コンポーネント内で直接 `className` 属性を文字列操作したり、クラス名の追加/削除によって `hidden` や `disabled` などの状態を制御したりすることは、外部 CSS の影響や意図しない副作用を招く可能性があるため避けてください。

* **メモ化 (Memoization):**
* 【推奨】不要な再レンダリングを避けるため、`React.memo`, `useCallback`, `useMemo` を適切に使用し、パフォーマンスを最適化してください。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

過度な最適化はやり過ぎではという会話が入ってない

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