Weekly GitHub Report for React - 2024-07-10 15:16:29
Weekly GitHub Report for React
Thank you for subscribing to our weekly newsletter! Each week, we deliver a comprehensive summary of your GitHub project's latest activity right to your inbox, including an overview of your project's issues, pull requests, contributors, and commit activity.
I. Issues
1.1 Open Issues
Open Issues This Week: 1
Summarized Issues:
- React 18.3
useEffect
Hook Bug: This issue describes a bug in React 18.3 where theuseEffect
hook runs multiple times with stale state values. This occurs even though no concurrent features are used. The unexpected behavior leads to effects not being guaranteed to run after state changes are settled.
1.2 Top 5 Active Issues:
We consider active issues to be issues that have generated much discussion in the issue's comments.
-
[React 19] Disabling prerendering siblings of suspended components breaking common pattern: This issue addresses concerns about a change in React 19 that disables prerendering for sibling components of suspended components, which can lead to performance problems by turning parallel requests into sequential ones. The discussion emphasizes the need for this change to be optional, allowing developers to choose between the new and old behaviors to avoid breaking common data-fetching patterns.
- The comments reflect a mix of appreciation for the React team's responsiveness and detailed discussions on the implications of the change, with suggestions for making the new behavior optional and concerns about performance regressions. There are also references to external discussions on social media, highlighting the broader community's engagement and the importance of clear communication about the purpose and impact of Suspense in React.
- Number of comments: 15
-
[React 19]
use
is significantly slower in some scenarios than throwing a Promise: This issue highlights a significant performance regression in React 19, where theuse
hook is much slower compared to throwing a Promise in certain scenarios, as observed during the Apollo Client test suite. The problem is particularly evident when comparing the test execution times between React 18 and React 19, with the latter requiring a much longer timeout to pass the same test.- The comments discuss various theories and findings, including how the issue is triggered by specific user input sequences and the interaction between
useDeferredValue
anduse
. Multiple users contribute by providing detailed timelines, potential workarounds, and a reproducible test case. The conversation also includes suggestions for alternative testing approaches and further investigation into theuse
hook's implementation. - Number of comments: 10
- The comments discuss various theories and findings, including how the issue is triggered by specific user input sequences and the interaction between
-
Bug: "Should have a queue. This is likely a bug in React": This issue describes a bug in React where removing a specific hook causes an error message stating, "Should have a queue. This is likely a bug in React." The problem occurs under specific conditions and is making it difficult to debug unrelated issues.
- The comments discuss the peculiar nature of the bug, with the initial action causing the error only on the first mount of the component. Subsequent mounts do not produce the error. The conversation includes a request for a minimal reproduction, a confirmation that hooks are not called conditionally, and advice to remove surrounding code to isolate the issue.
- Number of comments: 7
-
[React 19] Cannot assign to readonly property: This issue describes a problem encountered when upgrading to React 19 release candidate, where an error occurs related to assigning to a readonly property. The user provides a minimal code example and observations about the conditions under which the error does not occur.
- The comments discuss whether the issue is with Waku or React, with suggestions to test against Next.js and identify the specific React commit causing the error. A test case is provided, and it is noted that a similar issue was fixed in a recent PR, raising the question of whether the bug is already resolved.
- Number of comments: 7
-
[Compiler Bug]: react native reanimated shared value mutation: This issue pertains to a bug in the React Native Reanimated shared value mutation when using the react-compiler-healthcheck and eslint-plugin-react-compiler. The compiler complains about the mutation of shared values, which is a common pattern in React Native, and the health-check command confirms that the
App.tsx
file is not compiled.- The comments discuss the immutability requirements of React and suggest using a function for updates instead of property assignment. The issue might be resolved by either waiting for an API design update from the react-native-reanimated team or using a custom helper function for value assignment. The final comment suggests that the health check script needs a fix to properly track the reanimated import and enable the correct type information.
- Number of comments: 5
1.3 Top 5 Quiet Issues:
We consider quiet issues to be issues that have been opened in this project for the longest time. The team should work together to get these issues resolved and closed as soon as possible.
-
Bug: StrictMode: useEffect cleaned the second state instead of the first state during the first rendering: This issue describes a bug in React's StrictMode where the
useEffect
hook cleans up the second state instead of the first state during the initial rendering. The expected behavior is that the first state should be destroyed before the second state is created, but the current behavior shows that the second state is destroyed prematurely.- Open for 42 days, 10 hours, 06 minutes
-
[Compiler Bug]: Health check --src option only works with one file (so a glob needs to be quoted): This issue pertains to a bug in the
react-compiler-healthcheck
script where the--src
option only processes a single file unless the glob pattern is quoted. The user suggests that the--src
argument should be able to handle multiple files without requiring quotes around the glob pattern, as is common with most command line utilities.- Open for 42 days, 08 hours, 22 minutes
-
[Compiler Bug]: react native reanimated shared value mutation: This issue pertains to a problem with the React Native Reanimated shared value mutation, where the compiler complains about this common pattern in React Native applications. Additionally, the health-check command confirms that the
App.tsx
file is not being compiled, causing build issues when using the eslint plugin and the healthcheck script.- Open for 42 days, 08 hours, 04 minutes
-
[DevTools Bug]: devtools does not works on null origin(sandbox): This issue describes a bug in the DevTools where it fails to function correctly when the Content-Security-Policy header includes a sandbox directive on a local server. The problem can be reproduced consistently by using the development version of React with a specific webpack-dev-server configuration that sets the Content-Security-Policy to "sandbox allow-scripts".
- Open for 42 days, 04 hours, 36 minutes
-
[Compiler Bug]: Stripping curly braces breaks character escapes (breaks JSX spec 1.5.1): This issue pertains to a bug in the React compiler where stripping curly braces from a string with a newline character results in incorrect handling of character escapes, breaking the JSX specification 1.5.1. Specifically, the compiler incorrectly outputs
prop="text\\ntext"
instead ofprop={"text\\ntext"}
, causing the newline character to be treated as raw text rather than a newline.- Open for 42 days, 00 hours, 42 minutes
1.4 Closed Issues
Closed Issues This Week: 0
Average Issue Close Time (This Week): 0.00 days
Summarized Issues:
As of our latest update, there are no closed issues for the project this week.
1.5 Issue Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open issues within the past week to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open issues from the past week.
II. Pull Requests
2.1 Open Pull Requests
Open Pull Requests This Week: 3
Pull Requests:
- Prettier configuration update: This pull request updates the Prettier configuration to format all
.ts
and.tsx
files in the repository using the existing defaults and removes any overrides. The first commit contains the configuration changes, and the second commit reflects the results of runningyarn prettier-all
. This ensures consistent code formatting across the project.
- Legacy context warning mechanism: This pull request introduces a warning mechanism for environments where legacy contexts are still enabled. It aims to help developers identify and update remaining legacy context call sites. This is crucial for maintaining modern and efficient code practices.
- DOM nesting warning improvement: This pull request aims to improve the DOM nesting warning by formatting it as a diff view. It also adds an additional log for the stack trace to provide better context and clarity. These enhancements help developers debug and resolve issues more effectively.
2.2 Closed Pull Requests
Closed Pull Requests This Week: 0
Summarized Pull Requests:
As of our latest update, there are no closed pull requests for the project this week.
2.3 Pull Request Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open pull requests within the past week to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open pull requests from the past week.
III. Commits
3.1 Commits
Commits This Week: 21
Summarized Commits:
- Job Configuration Simplification: The job waterfall for runtime test jobs has been streamlined by simplifying the job configuration, allowing test jobs to start earlier and eliminating the initial job that was merely printing static JSON.
- Console Log Enhancements: The limit for serialized rate-limited objects in console logs has been increased, and a marker has been introduced to inform users when these objects are accessed, balancing server memory strain and client performance. Additionally, full support for the serialization of Map and Set objects has been added, making the console serialization process more forgiving.
- Error Handling Improvements: The
getCurrentStack
function is temporarily overridden while printing errors to ensure the regular mechanism for appending stack traces can be used, facilitating future removal of automatic appending. Non-null prototype errors in the Flight project now include context for better consistency with previously handled errors. - Legacy Warning Management: Redundant legacy context warnings are now raised only once per component, similar to the handling of other legacy API warnings. The outdated warning related to
propTypes
on instances has been removed aspropTypes
are no longer supported in React 19. - Component Stack Management: Handling of component stack nodes in the Fizz project has been refactored to address issues with stack management during retries and suspensions, ensuring that component stack frames are added only once before being attempted. Component stacks are now printed as error objects in DevTools for better source mapping.
- DevTools Enhancements: Issues with path handling in React DevTools have been addressed by fixing the handling of relative source map URLs and recognizing Windows-style URLs. The warning for
useFormState
on initial render is now correctly logged during rerenders, which could be hidden by DevTools in StrictMode. - Flow Type Checker Upgrades: The Flow type checker has been upgraded to versions 0.233.0, 0.234.0, and 0.235.0, as referenced in the Flow changelog, and is part of a stack of related changes managed with Sapling.
- Component Stack Information: Unknown location information has been added to component stacks in the main runtime to improve compatibility with stack parsers, addressing issues with parent stacks in
errorInfo.componentStack
, appended stacks inconsole.error
, and virtual frames in owner stacks. - Stable Dispatch Function: The dispatch function from
useActionState
is now considered stable, as indicated by the pull request number #29665. - Flight Framework Enhancements: The Flight framework now tracks the current owner, stack, and task when invoking
console.error
,onError
, oronPostpone
, ensuring accurate attribution and logging on both server and client sides. ThecaptureStackTrace
and owner stacks have been implemented on the server for Flight, integrating owner stacks with shared internals and modifying error logging to include these stacks while ensuring they are stripped out before being sent to the client. - Console Log Replay Control: An option to control whether console logs are replayed has been introduced, defaulting to true for browser builds and false for server builds, to avoid duplicate logs when using SSR.
- AssertConsole Helper Reliability: Issues with false passes and failures in assertConsole helpers have been addressed by ensuring the component stack is tested accurately using the same
normalizeCodeLocInfo
method applied elsewhere, thus preventing incorrect normalization and improving test reliability. - Node.js Stream Optimization: Node.js streams and the
renderToMarkup
function now accept and pass through raw string chunks, optimizing performance by avoiding unnecessary binary encoding and decoding, while ensuring that the server stream configuration adheres to specific constraints to maintain efficiency.
IV. Contributors
4.1 Contributors
Active Contributors:
We consider an active contributor in this project to be any contributor who has made at least 1 commit, opened at least 1 issue, or created at least 1 pull request in the past month.
Contributor | Commits | Pull Requests | Issues |
---|---|---|---|
Sebastian Markbåge | 30 | 0 | 0 |
Lauren Tan | 21 | 0 | 0 |
Jan Kassens | 12 | 0 | 0 |
poteto | 0 | 8 | 0 |
Mofei Zhang | 7 | 0 | 0 |
Mike Vitousek | 6 | 0 | 0 |
Joe Savona | 6 | 0 | 0 |
gsathya | 0 | 6 | 0 |
mvitousek | 0 | 6 | 0 |
Ruslan Lesiutin | 5 | 0 | 0 |
kassens | 0 | 3 | 0 |
phryneas | 0 | 0 | 3 |
msftedad | 0 | 0 | 3 |
Hendrik Liebau | 2 | 0 | 0 |
Jack Pope | 2 | 0 | 0 |
undeletable | 0 | 1 | 1 |
coleea | 0 | 1 | 1 |
Sebastian Silbermann | 1 | 0 | 0 |
Jack Works | 1 | 0 | 0 |
Sharath | 1 | 0 | 0 |
Jiachi Liu | 1 | 0 | 0 |
Timothy Yung | 1 | 0 | 0 |
Sol Lee | 1 | 0 | 0 |
LoganDark | 1 | 0 | 0 |
Sathya Gunasekaran | 1 | 0 | 0 |
nakjun | 1 | 0 | 0 |
NISHIZAWA Shuntaro | 1 | 0 | 0 |
jtrowald | 0 | 1 | 0 |
rozele | 0 | 1 | 0 |
hoxyq | 0 | 1 | 0 |
motiz88 | 0 | 1 | 0 |
subtleGradient | 0 | 1 | 0 |
Rekl0w | 0 | 1 | 0 |
TrickyPi | 0 | 1 | 0 |
jackpope | 0 | 1 | 0 |
mofeiZ | 0 | 1 | 0 |
saul-atomrigs | 0 | 1 | 0 |
ic-768 | 0 | 1 | 0 |
Debbl | 0 | 1 | 0 |
GrinZero | 0 | 1 | 0 |
sebmarkbage | 0 | 1 | 0 |
anders-sm | 0 | 0 | 1 |
TheBenevolentJoker | 0 | 0 | 1 |
michaelnadar | 0 | 0 | 1 |
BrendonSled | 0 | 0 | 1 |
V3RON | 0 | 0 | 1 |
issacgerges | 0 | 0 | 1 |
a-c-sreedhar-reddy | 0 | 0 | 1 |
ifrost | 0 | 0 | 1 |
ehellman | 0 | 0 | 1 |
aaronmw | 0 | 0 | 1 |
leblancr | 0 | 0 | 1 |
yatsuna827 | 0 | 0 | 1 |
meetesh06 | 0 | 0 | 1 |
jwalkerinterpres | 0 | 0 | 1 |
childrentime | 0 | 0 | 1 |
alexkahndev | 0 | 0 | 1 |
gkiely | 0 | 0 | 1 |
SuperOleg39 | 0 | 0 | 1 |
vnikolaew | 0 | 0 | 1 |
Henry-Hong | 0 | 0 | 1 |
Niranj-Ninja | 0 | 0 | 1 |
Dan-C-Reed | 0 | 0 | 1 |
nestarz | 0 | 0 | 1 |
derekcicerone | 0 | 0 | 1 |
sadiki-o | 0 | 0 | 1 |
Hoshino2123 | 0 | 0 | 1 |
Nantris | 0 | 0 | 1 |
ManchalaMaruthi09 | 0 | 0 | 1 |
evisong | 0 | 0 | 1 |
ahce | 0 | 0 | 1 |
Messiahhh | 0 | 0 | 1 |
mehrizi | 0 | 0 | 1 |
rbgksqkr | 0 | 0 | 1 |
maarbanuelos | 0 | 0 | 1 |
giyeonkwon | 0 | 0 | 1 |
aphedges | 0 | 0 | 1 |
Targter | 0 | 0 | 1 |
JstnMcBrd | 0 | 0 | 1 |
Adawntoremember | 0 | 0 | 1 |
enesgorkemgenc | 0 | 0 | 1 |
prashantmgk | 0 | 0 | 1 |
klmhyeonwoo | 0 | 0 | 1 |
ThenMorning | 0 | 0 | 1 |
nandastone | 0 | 0 | 1 |
hipstersmoothie | 0 | 0 | 1 |
locus032 | 0 | 0 | 1 |
Ayub-7 | 0 | 0 | 1 |
denis-sokolov | 0 | 0 | 1 |