solidjs basic
via PatrickJS/awesome-cursorrules
Essential Solid.js setup and best practices for functional component development.
What is solidjs basic?
Provides foundational guidance for Solid.js projects, covering reactive state management with createSignal, side effects with createEffect, and derived values with createMemo. Use this rule when starting a new Solid.js project or establishing team conventions for component structure and reactivity patterns.
- Use createSignal() for reactive state, createEffect() for side effects, and createMemo() for derived values
- Implement Show and For components for conditional and list rendering
- Use createStore() for complex state management
- Organize code with standard folder structure (components, pages, utils)
- Apply JSX for component templates and Solid Router for routing
- Implement lazy-loading and error boundaries for performance and reliability
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
// Solid.js Basic Setup .cursorrules
// Prefer functional components
const preferFunctionalComponents = true;
// Solid.js best practices
const solidjsBestPractices = [ "Use createSignal() for reactive state", "Utilize createEffect() for side effects", "Implement createMemo() for derived values", "Use createResource() for data fetching", "Implement Show and For components for conditional and list rendering", "Utilize createStore() for complex state management", ];
// Folder structure
const folderStructure = src/ components/ pages/ utils/ App.jsx index.jsx public/ index.html;
// Additional instructions
const additionalInstructions = `
- Use JSX for component templates
- Implement proper error boundaries
- Utilize Solid Router for routing when applicable
- Use Solid's built-in optimization features
- Implement lazy-loading for improved performance
- Follow Solid.js naming conventions and best practices
- Use server-side rendering (SSR) when needed `;
Related rules
Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.
Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.
Android development with Jetpack Compose, clean architecture, and Material Design 3.
Angular development with Novo Elements UI library using standalone components.
Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.
Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.