Oct
16
9 hours ago
started
started time in 19 minutes ago
started
started time in 23 minutes ago
Activity icon
issue

sizebot issue comment facebook/react

sizebot
sizebot

Removed useTransition timeoutMs config in tests

Summary

The timeoutMs config has been disabled and removed in the following PRs:

So I think it's safe to remove all of them from the tests.

How did you test this change?

yarn test

sizebot
sizebot

Comparing: b72dc8e9300f5ae997f7f5cfcd79b604cca3df0c...c399d5b6db46a425d0fa835c9c466c3566a5b0c2

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 130.15 kB 130.15 kB = 41.41 kB 41.41 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 132.98 kB 132.98 kB = 42.39 kB 42.39 kB
facebook-www/ReactDOM-prod.classic.js = 414.32 kB 414.32 kB = 76.58 kB 76.58 kB
facebook-www/ReactDOM-prod.modern.js = 402.91 kB 402.91 kB = 74.85 kB 74.85 kB
facebook-www/ReactDOMForked-prod.classic.js = 414.32 kB 414.32 kB = 76.58 kB 76.58 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by :no_entry_sign: dangerJS against c399d5b6db46a425d0fa835c9c466c3566a5b0c2

pull request

chentsulin pull request facebook/react

chentsulin
chentsulin

Removed useTransition timeoutMs config in tests

Summary

The timeoutMs config has been disabled and removed in the following PRs:

So I think it's safe to remove all of them from the tests.

How did you test this change?

yarn test

started
started time in 53 minutes ago
pull request

crypt096 merge to facebook/react

crypt096
crypt096

Replace global `jest` heuristic with `IS_REACT_ACT_ENVIRONMENT`

Refer to https://github.com/reactwg/react-18/discussions/102 for context on overall proposal

Based on #22561

In concurrent roots, instead of checking jest, we check the new IS_REACT_ACT_ENVIRONMENT global. The default behavior is false.

React's own internal test suite use a custom version of act that works by mocking the Scheduler — rather than the "real" act used publicly. So we don't enable the flag in our repo.

Also adds a warning if act is called but IS_REACT_ACT_ENVIRONMENT is not enabled. The goal is to prompt users to correctly configure their testing environment, so that if they forget to use act in a different test, we can detect and warn about.

It's expected that the environment flag will be configured by the testing framework. For example, a Jest plugin. We will link to the relevant documentation page, once it exists.

The new warning only fires in concurrent roots. Legacy roots will keep the existing behavior.

pull request

crypt096 merge to facebook/react

crypt096
crypt096

Refactor for the parseRequestedNames function

This is a simple code refactor. There are no changes to functionality or bug fixes it just removes for loops with built-in functions for easier reading and fewer variables being declared.

Summary

Making the code more clear and easier to read with fewer lines of code.

How did you test this change?

I ran yarn test and all tests passed with and without the change. The speed did not change.

Activity icon
fork

miguelFLG13 forked facebook/react

⚡ A declarative, efficient, and flexible JavaScript library for building user interfaces.
miguelFLG13 MIT License Updated
fork time in 1 hour ago
started
started time in 1 hour ago
started
started time in 2 hours ago
Previous