Comment

Comment by zappo2938

To understand React, it is important to understand the difference between imperative and declarative coding. [0] React is a way to write declarative code that use life cycle hooks or effects to do imperative "stuff".

The best explanation oh how useEffect works is by Dan Abramov [1] It is also worth reading his article on React as a UI Runtime as it is a good explanation of React conceptually under the hood.

[0] https://courses.reacttraining.com/courses/250055/lectures/38... (Can sign in for free to watch this one video.)

[1] https://overreacted.io/a-complete-guide-to-useeffect/

parent zappo2938 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton