Features implemented: - Auto-save with counter-based debounce in note editor - Note refetches when switching between notes (note_id prop changes) - Todos feature with full CRUD operations - Markdown rendering in todo titles - API endpoints for todos (create, list, toggle, delete) - Todo panel in sidebar with sorting (incomplete first, newest first) - Todo items use TodoItem component for clean separation Technical changes: - Added Todo struct and API endpoints in api package - Added markdown dependency to web package - Implemented TodoPanel component with TodoItem sub-component - Added mut keywords to signal bindings for Dioxus 0.7 - Fixed closure capture issues with cloning todo objects
API
This crate contains all shared fullstack server functions. This is a great place to place any server-only logic you would like to expose in multiple platforms like a method that accesses your database or a method that sends an email.
This crate will be built twice:
- Once for the server build with the
dioxus/serverfeature enabled - Once for the client build with the client feature disabled
During the server build, the server functions will be collected and hosted on a public API for the client to call. During the client build, the server functions will be compiled into the client build.
Dependencies
Most server dependencies (like sqlx and tokio) will not compile on client platforms like WASM. To avoid building server dependencies on the client, you should add platform specific dependencies under the server feature in the Cargo.toml file. More details about managing server only dependencies can be found in the Dioxus guide.