mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-30 05:14:06 +01:00
477 B
477 B
BlitzKit
Layout
- Hooks live in
src/hooks/useName.ts(.tsxif they render JSX), one hook per file named after it, never inside a component's folder.
TypeScript
- When an
if/else ifchain checks one value against several candidates (x === "a",x === b, ...), use aswitchon that value instead. Inside a loop, end each case withcontinue, and put the checks aswitchcan't express (startsWith, ranges, ...) as anifafter it, not indefault.