Viewing profile — davidmccabe
davidmccabe
HN member- Joined
- Thu, May 14, 2020, 4:53 PM UTC
- HN karma
- 50
- Public activity
- 13 items
- HN profile
- View on Hacker News ↗
About davidmccabe
Recent public activity
-
comment
Comment #35718889
GraphQL is really intended to model UI concepts rather than directly exposing your database schema. First of all, your GraphQL schema is basically append-only due to older clients …
-
comment
Comment #34278523
Hey, this is David from the React team at Meta. I've been working on revamped documentation for Relay, our GraphQL data fetching library. Relay is an incredible technology but has …
- story
-
comment
Comment #23231119
We are planning in the next few weeks an overhauled persistence API. Among other things this will add the ability to provide a callback in `initializeState` rather than a value. Ho…
-
comment
Comment #23195539
React doesn't have to commit to the DOM if there are no changes, but it still has to render each component and compare the output. Even if the component is memoized, it still has t…
-
comment
Comment #23195439
I could be mistaken but I think that you still have to do a shallow compare on the connected props of every component.
-
comment
Comment #23195368
Well, I should say "doesn't make it harder". The `RecoilRoot` component accepts a prop called `initializeState` that lets you specify the state of all atoms in the initial render.
-
comment
Comment #23185927
For a specific set of atoms you could subscribe to them with a component and then use an effect to send the values out. For all atoms you could use useTransactionObservation.
-
comment
Comment #23185451
It’s actually designed to make server rendering easy. We’ll add a guide about this eventually. Atoms aren't global singletons: their values are scoped to React trees.
-
comment
Comment #23183558
The term 'atom' is a clojure-ism, that's where both I and reframe get it from.
-
comment
Comment #23183427
If you update multiple atoms within a React batch, they will be updated at the same time, just as with React local state. You don't need to wrap the changes in anything to have the…
-
comment
Comment #23183259
The app in question had thousands of connected components, so that was a huge bottleneck for them. For many apps it doesn't matter. The app that Recoil was originally extracted fro…
-
comment
Comment #23183177
Well, I know that on one tool we saw a 20x or so speedup compared to using Redux. This is because Redux is O(n) in that it has to ask each connected component whether it needs to r…