2 ms·
I assumed the was just directionally wise? That is, it is clearly useless here, as there are no "dependencies" passed; but in a real app you almost certainly h
by taeric 4y ago
I assumed the was just directionally wise? That is, it is clearly useless here, as there are no "dependencies" passed; but in a real app you almost certainly have something there.
Still digesting the rest. I'm curious why the mix of raw HTML. (Not in why it is a bad idea, but why it was felt necessary.)
- e1g 4y agoIn this specific case, having useCallback makes the demo code more complex and is unrelated to the actual concept being demo'ed to the reader. It's unwise to add unnecessary complexity if it doesn't add clarity. More generally, adding useCallback is even directionally wrong unless you know _exactly_ why you need it ("for identity" is OK, "for performance" is almost always misguided because the cost of creating a closure is negligible).
- taeric 4y agoWouldn't you want it to be "dependent" on whatever the source of the data is?