Advent Of Code 2021 solutions in Text Munge. https://munge.netlify.app/
Why? I don't know.
interface UniversalAction<TState> { | |
type: "UNIVERSAL"; | |
map: (previous: TState) => TState; | |
} | |
function universalAction<TState>(map: (previous: TState) => TState): UniversalAction<TState> { | |
return { type: "UNIVERSAL", map }; | |
} | |
// all other reducers are now redundant |
Advent Of Code 2021 solutions in Text Munge. https://munge.netlify.app/
Why? I don't know.
#( | |
@/(\d+)\n(\d+)/=>{$1 $2 +} | |
fx /\d+/ => { _ get(max) max set(max) } | |
{ get(max) } | |
) |
At the end of this, I'll know I failed if I can't write my own useState
.
Here we go. The very first tutorial. Should be simple. https://react.dev/learn/tutorial-tic-tac-toe
It has some kind of online sandbox thing. I prefer local dev for this, as I think their sandbox is going to be hiding smoke and mirrors. I want to be able to run react on arbitrary places outside their walled gardens. Fortunately, they have instructions for doing it.
Here's a partial list of my problems with React. Some may be matters of opinion. There may be more.
Reconciliation matches freshly rendered components with stored state. It usually does what you wanted. Setting key
s affects the algorithm somehow. I'd prefer explicit component identity to a mostly-correct heuristic.