react/compiler
Aditya Subramanyam 579cc2a44c
[playground] Add support for "use no memo" (#31561)
Fixes #31331

## Summary
There is a bug in
playground(https://github.com/facebook/react/issues/31331) which doesnt
support 'use memo' or 'use no memo' directives. Its misleading while
debugging components in the playground

## How did you test this change?
Ran test cases and added a few extra test cases as well

## Changes
1) Adds support for 'use memo' and 'use no memo'
2) Cleanup E2E test cases a bit
3) Adds test cases for use memo
4) Added documentation to run test cases

## Implementation
`parseFunctions` returns a set of functions to be compiled. But, it
doesnt filter out/handle memoized opted/un-opted functions using
directives.

ive just created a `compile` flag to enable/disable compiling
[here](https://github.com/facebook/react/pull/31561/files#diff-305de47a3fe3ce778e22d5c5cf438419a59de8e7f785b45f659e7b41b1e30b03R113)

Then I am just skipping those functions from getting compile
[here](https://github.com/facebook/react/pull/31561/files#diff-305de47a3fe3ce778e22d5c5cf438419a59de8e7f785b45f659e7b41b1e30b03R253)
2024-11-18 15:38:22 -05:00
..
apps/playground [playground] Add support for "use no memo" (#31561) 2024-11-18 15:38:22 -05:00
crates Fix rust lints 2024-08-06 14:48:32 -04:00
docs Punctuation & correcting spelling mistakes (#30592) 2024-08-09 14:53:53 -07:00
fixtures [cleanup] Remove compiler runtime-compat fixture library (#31430) 2024-11-05 14:14:39 -05:00
packages [playground] Add support for "use no memo" (#31561) 2024-11-18 15:38:22 -05:00
scripts [ci:compiler] Only add latest tag to non-experimental (#31288) 2024-10-18 13:24:30 -04:00
.eslintrc.js [compiler:codegen] Wrap non-ascii characters in JsxExpressionContainer 2024-06-21 10:08:15 -04:00
.gitignore
Cargo.lock Bump rustix from 0.37.22 to 0.37.27 in /compiler (#29173) 2024-05-20 12:02:35 +01:00
Cargo.toml Update references to Forget to React Compiler 2024-05-02 14:28:06 -07:00
package.json [snap] Add react-compiler-runtime as a dependency (#31142) 2024-10-07 16:38:06 -04:00
README.md Update readme and other docs 2024-05-06 14:53:47 -07:00
rust-toolchain.toml
rustfmt.toml
yarn.lock [compiler] Update react deps to experimental instead of beta (#31385) 2024-10-29 21:51:41 -04:00

React Compiler

React Compiler is a compiler that optimizes React applications, ensuring that only the minimal parts of components and hooks will re-render when state changes. The compiler also validates that components and hooks follow the Rules of React.

More information about the design and architecture of the compiler are covered in the Design Goals.

More information about developing the compiler itself is covered in the Development Guide.