10 Matching Annotations
  1. Dec 2022
    1. Context selectors, however, could be faked with the use of higher-order components and React.memo.
    2. If in Context there is a combination of data and API (getters and setters) they can be split into different Providers under the same component. That way, components that use API only won’t re-render when the data changes.
    3. the typical use case for useMemo would be to memoize React elements. Usually parts of an existing render tree or results of generated render tree, like a map function that returns new elements
    4. If a child component is wrapped in React.memo, all props that are not primitive values have to be memoized

    5. All props that are not primitive values have to be memoized for React.memo to work
    6. state changes
  2. Nov 2022
    1. But if you want to be able to make local edits and then push them back, you need to use this recipe instead: git clone git@gist.github.com:0a30d52feeb3ff60f7d8636b0bde296b.git You can find this in the "Embed" menu, as the "Clone via SSH" option.