AWAdrien Waldineng.coloop.ai·Jan 28 · 3 min readReact Slots: Dynamic Sidebars and Headers Without the MessThe Problem You have a layout with a sidebar. Different pages need different sidebar content. The obvious solutions all have tradeoffs: Prop drilling: Pass sidebar content up through every layer. Verbose, brittle. Global state: Store sidebar config i...00
AWAdrien Waldineng.coloop.ai·Jan 23 · 3 min readState is a Record of the Past, Not a Claim About the PresentOne of the most common React mistakes I see is using useEffect to keep two pieces of state in sync. It seems intuitive, but it introduces a subtle bug — and more importantly, it reveals a misunderstanding about what state actually represents. The Pro...00