While the reasoning holds generally, that specific example is wrong.
The type the author presents is not the “User Profile” but a “User Profile Load Resource” (or something in those terms).
When you actually design interfaces you discover that there are way more states to keep in mind when implementing asynchronous loading.
1. There’s an initial state, where fetching has not happened yet
2. There may be initial cached (stale or not) data
3. Once loaded the data could be revalidated / refreshed
So the assumption that you either are loading XOR have data XOR have an error does not hold. You could have data, an error from the last revalidation, and be loading (revalidating).
The output looks terribly similar to what sci-fi movies envisioned as 3D reconstruction of scenes. It is absolutely awesome. Now, if we could project them in 3D… :)
Posted it few days ago but didn’t get any traction. All Linus’ work on retro computing is fenomenal. Please have a look at its channel, a lot of awesome content there.
Since the dissertation by Ken Thompson about compiler trustability was quoted today, I thought it would be a good idea to bring this short novel back from the archive. Loved it years ago and still is very enjoyable.
I think a custom renderer for react would much more powerful. Currently JSX is just used as syntax sugar. Wasn’t some react ink project that more or less made this?
Let’s say you have a rich text where you want to highlight all occurrences of some token or syntax. When you have tree data structures you cannot use regexps or a simple parsers, since the full text may be split in different nodes.
With attributes strings it’s trivial, you just need to move attributes accordingly and to normalize stuff at the end.
In the era of DOM documents (see notion, gitbook) I very often resort to attributed strings to do magic stuff with text parsing and manipulation. It’s such an elegant structure and I don’t understand why is so unknown.
The adage is that if we didn’t die of age we would simply not cross the street, the odds may look slim in our short lifespan, but if you extend those to a thousand years getting hit becomes a facto of when, not if