Skip to content

Conversation

@andrzejressel
Copy link

I've added error message with instruction how to fix infamous React.act is not a function error

What:

I myself encountered this error and seeing number of issues in Github and StackOverflow - it seems to be pretty common issue. If NODE_ENV is set to production the error will tell user to change this env var to test.

Why:

To make initial experience simpler for new JS devs like me.

How:

By making the error return action that will probably fix the issue.

Checklist:

  • Documentation added to the
    docs site N/A
  • Tests (can it be tested since specific env var is required?)
  • TypeScript definitions updated N/A
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 1, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 66cfb82:

Sandbox Source
react-testing-library-examples Configuration

@andrzejressel
Copy link
Author

andrzejressel commented Jan 1, 2026

To be honest - I don't know how to fix the CI - I understand that the branch is not tested, but I have no idea how to mock these env vars - especially since I believe they must be set during build time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant