I often hear, "Dang! I thought I knew JavaScript. Where can I read up on some of these confusing features?"
Here are some:
-
- The
=>
operator
- The
-
- The
??
operator
- The
-
- The
?
operator
- The
-
- The
? - :
operator
- The
-
- importing and exporting
-
- The
...
operator
- The
-
- The `` operator
- Hit F12 in Windows or cmd-opt-i in MacOS
- Click the hamburger menu and choose other tools-developer tools then choose "Console" in the tab.
- Right-click the page, choose Inspect and then choose "Console" in the tab.
Just like above, get the dev tools open but then hit the "Network" tab. You'll be able to see every request and response. Clicking on a request will show you its details.
When useEffect has a dependency which is not listed in the dependency array, you may have some headaches in debugging issues as a result. So the best practice is to list every single one and to enable the exhaustive dependency linting rule. That is our official position.
However we are very aware of the controversy around this topic and the confusion caused by it so, for the purposes of a beginner class that already has a HUGE concept count, we've chosen to not make a big deal of emphasizing exhaustive dependencies. Our goal is for people to learn best practices but not at the expense of them quitting because "React is too hard to learn." Please don't judge us too harshly; we all have to make tradeoffs.