3 ms·
That’s not really all that different to everyone moving their CSS-in-JS and GraphQL queries out of a functional component body though, is it? This is kind of ex
by thomasfoster96 8y ago
That’s not really all that different to everyone moving their CSS-in-JS and GraphQL queries out of a functional component body though, is it? This is kind of exactly the scenario Symbols seem to have been intended for.
Also... a nitpick, but `new Symbol` always throws a TypeError. And Symbol.for() is a useful escape hatch.
- genezeta 8y ago> Also... a nitpick, but `new Symbol` always throws a TypeError. And Symbol.for() is a useful escape hatch. Yes, you're right. I was distracted with other stuff and meant just Symbol, without new. I'll fix it. Thanks. As for the rest... Well, I don't really care much for React and many of the decisions they make. I don't like CSS-in-JS at all, and GraphQL... well, that one's nothing new.
- danabramov 8y ago>That’s not really all that different to everyone moving their CSS-in-JS and GraphQL queries out of a functional component body though, is it? I suggest you to take the `useSubscription` example from the "diamond problem" section and try to convert it to your proposed API. I think you'll see why it falls apart. (Don't forget effects would also need keys.)