Grokking React Native
Vote

0% completed

​

Understanding useEffect in React Native

Some work in a component has nothing to do with deciding what appears on the screen: starting a timer, subscribing to an event, or requesting data from a server. This kind of work changes or depends on something outside the render, so it is a side effect, the term from the Hooks chapter. React needs you to keep side effects out of the render itself, because a component can render many times. The useEffect Hook gives them a separate place, and React runs that code after the component has rendered.

Data fetching is a side effect, which is why this lesson comes first

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content