react
react copied to clipboard
The library for web and native user interfaces.
## Summary This PR adds a verbose option to `react-compiler-healthcheck` CLI which logs all the compiled components/hooks names and files location. Fixes: https://github.com/facebook/react/issues/29078 ## Test plan Run the `react-compiler-healthcheck` CLI...
@jbonta nerd-sniped me into making this optimization during conference prep, posting this as a PR now that keynote is over. Consider these two cases: ```javascript export default function MyApp1({ count...
## Summary Same as https://github.com/reactjs/react.dev/pull/6870 Move the eslint-rule specifier to use named `"error"` instead of numeric `2` as it's easier to read :) ## How did you test this change?...
Certain compiler passes currently may collect a few error events before reporting (see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts#L101-L107)
## Summary Trying out `eslint-plugin-react-compiler`, it warns on the following code: ```tsx function Foo({ ...props }) { props.foo = false; // Mutating component props or hook arguments is not allowed....
## Summary In **React 18**, Fiber exposed `_debugSource` In **React 19** (19.0.0-rc-915b914b3a-20240515) this was changed to `_debugInfo` but the value is alway `null`
## Summary https://react.dev/reference/react/useActionState ```javascript const [state, action] = useActionState(reduce, initState) return hit me! ``` It looks like the docs are assuming that the `reduce` parameter function never throws an error...
## Summary Using `obj.value` or `obj['value']` in a computed property causes the compiler to not memoize the component. Example: https://playground.react.dev/#N4Igzg9grgTgxgUxALhAHQHYDMobgFwEsIMACAYQgFsAHEhDfACgEpThNTS4Sx9SIAIwBWpALztOXUgDcAhgBtkpAOQBrBAE8VAGikBfANxSeGPrMVQE4yWWkBtIcIB08hQF1l+GFb139UjAI+LBkADwAfGEA9BGYRpgg+kA I see there is a todo prefix in the compiler...
This is necessary to simplify the component stack handling to make way for owner stacks. It also solves some hacks that we used to have but don't quite make sense....
Updated the description for the react_estree extension documentation ## Summary ## How did you test this change? N/A