
Remix and Radix fanboi. Created govuk-react. Prev UI consultant @Speechmatics, @NearForm, @IBM. DreamBerd consultant (world first) @penx@fosstodon.org
- Tweets974
- Following830
- Followers244
- Likes1.9K
![Code screenshot: ```tsx const MyComponent = lazy(() => import("./MyComponent")); function App() { return ( <Suspense> <UseEffect /> </Suspense> ); } function UseEffect() { const [effectCounter, setEffectCounter] = useState(0); useEffect(() => { setEffectCounter((x) => x + 1); }, []); const [clickCounter, setClickCounter] = useState(0); return ( <> <div>clicks: {clickCounter}</div> <div>effects: {effectCounter}</div> <button onClick={() => setClickCounter((x) => x + 1)}>+1</button> {clickCounter < 2 ? ( <div>Suspend will happen on 2nd click</div> ) : ( <MyComponent /> )} </> ); } ```](https://pbs.twimg.com/media/GpVYXxUXMAAbZ7j.jpg?name=small&format=webp)
ALT Code screenshot: ```tsx const MyComponent = lazy(() => import("./MyComponent")); function App() { return ( <Suspense> <UseEffect /> </Suspense> ); } function UseEffect() { const [effectCounter, setEffectCounter] = useState(0); useEffect(() => { setEffectCounter((x) => x + 1); }, []); const [clickCounter, setClickCounter] = useState(0); return ( <> <div>clicks: {clickCounter}</div> <div>effects: {effectCounter}</div> <button onClick={() => setClickCounter((x) => x + 1)}>+1</button> {clickCounter < 2 ? ( <div>Suspend will happen on 2nd click</div> ) : ( <MyComponent /> )} </> ); } ```








![const a = [{}] as const; const b: typeof a = [false];](https://pbs.twimg.com/media/GPUQUJ0XgAAfrcN.png?name=small&format=webp)



