Best Practices
A summary:
- Reactivity: Use
track()
to create reactive variables and@
to access them - Strings: Wrap string literals in
{"string"}
within templates - Effects: Use
effect()
for side effects, not direct reactive variable access - Components: Keep components focused and use TypeScript interfaces for props
- Styling: Use scoped
<style>
elements for component-specific styles - Collections: Use RippleArray/RippleSet for reactive collections instead of regular arrays/sets