# How Does setState Know What to Do?

DevFeed: [How Does setState Know What to Do?](<https://devfeed.tech/articles/how-does-setstate-know-what-to-do-36170.md>)

Original publisher: [Read original article](<https://overreacted.io/how-does-setstate-know-what-to-do/>)

Published: 2018-12-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dan Abramov](<https://devfeed.tech/sources/dan-abramov.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>), [React Native](<https://devfeed.tech/topics/react-native.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [components](<https://devfeed.tech/tags/components.md>), [mount](<https://devfeed.tech/tags/mount.md>), [react](<https://devfeed.tech/tags/react.md>), [render](<https://devfeed.tech/tags/render.md>)

## AI overview

This article explains how React's setState updates are handled across different renderers. It describes the separation between React's component APIs and platform-specific renderer packages, allowing the same components to work with the DOM, React Native, and other renderers.

## Source excerpt

Dependency injection is nice if you don't have to think about it.