Live data from Hacker News

Viewing profile — davidmccabe

davidmccabe

HN member
Joined
Thu, May 14, 2020, 4:53 PM UTC
HN karma
50
Public activity
13 items

About davidmccabe

UI Engineer, React team at Meta. Previously, author of Recoil (http://recoiljs.org). Open to network.

Recent public activity

  1. 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 …

  2. 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 …

  3. story
  4. 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…

  5. 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…

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. comment
    Comment #23183558

    The term 'atom' is a clojure-ism, that's where both I and reframe get it from.

  11. 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…

  12. 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…

  13. 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…