Building a todo app with state management
Learn state management in Aurelia by building a todo application with @aurelia/state
What You'll Learn
Prerequisites
What We're Building
Step 1: Create the Project
Step 2: Install @aurelia/state
Step 3: Define Your State Shape
Step 4: Create Action Handlers
Step 5: Create Middleware
Step 6: Configure the State Plugin
Step 7: Create the Todo Input Component
Step 8: Create the Todo List Component
Step 9: Create the Main App Component
Step 10: Add Styling
Step 11: Run Your App
Step 12: Debug with Redux DevTools
Understanding the Data Flow
Best Practices
1. Keep State Normalized
2. Use Memoized Selectors for Expensive Computations
3. Keep Action Handlers Pure
4. Use TypeScript for Type Safety
Next Steps
Common Questions
When should I use @aurelia/state vs local component state?
Can I use @aurelia/state with the router?
How does this compare to Redux?
Can I dispatch actions from templates?
Summary
Last updated
Was this helpful?