React
- frontend
- in current work
I honestly can't remember a project where I didn't reach for React. It's in LoS, in the Wine Sommelier frontend, in Free Clothes, in the LMS Whitelabel. Basically everywhere I need a UI. I picked it up early and just never stopped. The component model clicked with how my brain wants to organize things: small pieces, each owning its own state and logic, composed together into something bigger.
What kept me around was hooks. Once those landed, managing side effects and state stopped feeling like a fight. There was a learning curve (useEffect dependency arrays still trip me up sometimes), but the payoff is worth it. I pair it with TypeScript now and the combination makes refactoring large codebases feel almost safe. Almost.
const ready = !!meta?.gameCount;
const listKey = view === "list" ? list.ids.join(",") : "";
useEffect(() => {
if (!ready || view === "discover" || view === "library") return;
const ctrl = new AbortController();
setLoading(true);
api.search(query, { signal: ctrl.signal, ids: view === "list" ? list.ids : undefined }).then(
(r) => {
setResponse(r);
setError(null);
setLoading(false);
},
(e) => {
if (ctrl.signal.aborted) return;
setError(String(e.message ?? e));
setLoading(false);
},
);
return () => ctrl.abort();
// list.ids is tracked through listKey so a new array with the same ids doesn't refetch.
}, [query, ready, view, listKey]);