Comment

Comment by jameshart

The bit of react that is f(newState) => UI is the easy part.

The bit that is g(state, userInput) => newState is the hard part. In particular managing the scope of that newState.

Oh, and sometimes you need to handle h(state, asynchronousData) => newState too.

And then comes the fact that even though your f is _pure_, it also has to be _fast_, because it's going to run every time you get a newState.

parent jameshart 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton