# Fix the "not wrapped in act(...)" warning

DevFeed: [Fix the "not wrapped in act(...)" warning](<https://devfeed.tech/articles/fix-the-not-wrapped-in-act-warning-51764.md>)

Original publisher: [Read original article](<https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning>)

Published: 2020-02-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kent C. Dodds Blog](<https://devfeed.tech/sources/kent-c-dodds-blog.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [testing-library](<https://devfeed.tech/topics/testing-library.md>), [hooks](<https://devfeed.tech/topics/hooks.md>), [async](<https://devfeed.tech/topics/async.md>), [Jest](<https://devfeed.tech/topics/jest.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [hooks](<https://devfeed.tech/tags/hooks.md>), [jest](<https://devfeed.tech/tags/jest.md>), [react](<https://devfeed.tech/tags/react.md>), [testing](<https://devfeed.tech/tags/testing.md>), [testing-library](<https://devfeed.tech/tags/testing-library.md>)

## AI overview

A tutorial explains React's "not wrapped in act(...)" warning in component tests. It shows how incomplete tests can miss asynchronous updates and how act wrappers and React Testing Library's async utilities help detect regressions.

## Source excerpt

There are a few reasons you're getting this warning. Here's how you fix it.