3 ms·
Isn't this basically the same tradeoff as Contexts vs Prop-Drilling? You could achieve the same effects by passing down callbacks. I thought the reason why th
by SebastianKra 5y ago
Isn't this basically the same tradeoff as Contexts vs Prop-Drilling?
You could achieve the same effects by passing down callbacks.
I thought the reason why this is good for Errors, Themes and Loading (Suspense), is because they're so common, that you can always expect someone up in the hierarchy to consider it, and therefore sacrifice some type safety for less verbosity.
The article mentions that "usually the fact that a function can perform an effect would be encoded into its type signature", which is why I don't understand the need in this example.