curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

React Hooks: changed confusing phrasing about 'useEffect' and ESLint

Open marcodallagatta opened this issue 2 years ago • 0 comments

Complete the following REQUIRED checkboxes:

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text

Complete the following checkboxes ONLY IF they are applicable to your PR. You can complete them later if they are not currently applicable:

  • [x] I have previewed all lesson files included in this PR with the Markdown preview tool to ensure the Markdown content is formatted correctly
  • [ ] I have ensured all lesson files included in this PR follow the Layout Style Guide

1. Because: Wording was confused and probably a result of a copy paste error.

2. This PR:

  • The dependency array at the end is optional, however, you will include it more often than not. A dependency is any state, prop, context that is used within the useEffect callback. You can also include state or props that are not. === becomes === The dependency array at the end is optional, however, you will include it more often than not. A dependency is any state, prop or context that is used within the useEffect callback, but you can also include state or props that are not.
  • useEffect will trigger based on changes in the dependencies listed. ESLint will warn you if it expects a dependency, but one is not added, however, this is a warning and they are not required. === becomes === useEffect will trigger based on changes in the dependencies listed. ESLint will warn you if it expects a dependency, however, this is a warning and they are not required.

3. Additional Information:

marcodallagatta avatar Sep 18 '22 15:09 marcodallagatta