Todo app
The classic, as streams. Events push into two Subjects from plain handlers: text$ for keystrokes, submit$ for the form. The list derives from them. Each submit samples the latest text with withLatestFrom, and scan accumulates the items.
Note the hook split:
- The controlled input reads
useSyncObservable. The caret and IME need synchronous updates. - The list reads
useObservable. It’s deferred, so a long list can’t make typing lag.
Last updated on