☰
📌
70 words · edited 5d ago
🗑
#
The core pattern: 1. User edits note → local state updates immediately 2. Debounced fetcher.submit() sends data to the action 3. While fetcher.state !== 'idle', show "Saving…" 4. On success, loader re-runs and fresh server data replaces optimistic state 5. On failure, Remix surfaces the error; UI reverts This eliminates the loading spinner for every keystroke and makes the app feel like a local app, not a round-trip server app.