Home

facebook/react

Status:Indexed
Analyzed 3d ago240K+ starsJavaScript

The library for web and native user interfaces.

Back to Pull Requests
#34472Closed
Moderate Review

[compiler] ValidateExhaustiveDeps disallows unnecessary non-reactive deps

by josephsavonaSep 11, 2025
View on GitHub

Summary

This pull request enhances React's compiler to enforce stricter dependency checking for hooks. It now disallows dependencies that are known to be non-reactive, aiming to prevent potential bugs and improve code clarity by ensuring all hook dependencies are indeed reactive values.

Changes

+139 additions-51 deletions

Impact Areas

CompilerHooks APIDeveloper Experience