-
Notifications
You must be signed in to change notification settings - Fork 51.1k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c8d9b8878a3a50fe94db5407727a3d5cba13f971
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 31f75cd4a0579c0be93b71ffc48ce0b308dad334
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 9 commits
- 2 files changed
- 2 contributors
Commits on Aug 11, 2020
-
[eslint-plugin-react-cooks] Report constant constructions
The dependency array passed to a React hook can be thought of as a list of cache keys. On each render, if any dependency is not `===` its previous value, the hook will be rerun. Constructing a new object/array/function/etc directly within your render function means that the value will be referentially unique on each render. If you then use that value as a hook dependency, that hook will get a "cache miss" on every render, making the dependency array useless. This can be especially dangerous since it can cascade. If a hook such as `useMemo` is rerun on each render, not only are we bypassing the option to avoid potentially expensive work, but the value _returned_ by `useMemo` may end up being referentially unique on each render causing other downstream hooks or memoized components to become deoptimized.
Configuration menu - View commit details
-
Copy full SHA for bc36370 - Browse repository at this point
Copy the full SHA bc36370View commit details
Commits on Aug 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 450cdfd - Browse repository at this point
Copy the full SHA 450cdfdView commit details -
Don't give an autofix of wrapping object declarations
It may not be safe to just wrap the declaration of an object, since the object may get mutated. Only offer this autofix for functions which are unlikely to get mutated. Also, update the message to clarify that the entire construction of the value should get wrapped.
Configuration menu - View commit details
-
Copy full SHA for 75fcb35 - Browse repository at this point
Copy the full SHA 75fcb35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b6e20e - Browse repository at this point
Copy the full SHA 4b6e20eView commit details
Commits on Aug 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e0ca072 - Browse repository at this point
Copy the full SHA e0ca072View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dc35db - Browse repository at this point
Copy the full SHA 4dc35dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for eaa2aff - Browse repository at this point
Copy the full SHA eaa2affView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b7ae4b - Browse repository at this point
Copy the full SHA 2b7ae4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 31f75cd - Browse repository at this point
Copy the full SHA 31f75cdView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff c8d9b8878a3a50fe94db5407727a3d5cba13f971...31f75cd4a0579c0be93b71ffc48ce0b308dad334