- TypeScript + React, strict typing preferred.
- 2-space indentation, single quotes, no semicolons.
- Keep components functional and prefer hooks for shared logic.
- Avoid implicit
anyand ensure exported types are explicit. - Use early returns to reduce nesting in handlers and effects.
- Keep styles grouped near the component, prefer
StyleSheet.createon iOS.
- Components:
PascalCase.tsx - Hooks:
useThing.ts - Tests:
*.test.tsor*.test.tsx - Playwright:
*.spec.ts
- Use concise but useful JSDoc above exported component functions.
- Describe the role and intent without repeating the component name.
- Keep wording helpful and scannable.
- Web UI: build custom React components that match the product’s design language.
- iOS UI: use native UIKit components (e.g.,
UISegmentedControl,UIVisualEffectView) for authentic iOS appearance. Prefer Expo packages (expo-glass-effect) when available. Avoid SwiftUI withUIHostingControllerdue to React Native bridge complexity.