Consistently call the second argument to useEffect dependencies array #1342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is more thought of as a discussion starter. I was trying to find out how we refer to the second argument of the
useEffect
hook and it seems that we useinputs
in both the API reference as well as the implementation but this name isn't used in the guide article on effects.This made it hard for someone to explain this concept to me since she didn't know how to call it and made up a name instead. I think we should be more up-front about this name so it's easier to discuss it.
We should probably also mention it in the API signature. I've wrapped it in square brackets like we do for
useImperativeMethods
.