react/compiler
Tyler Scott Williams ef06b54f8d
fix: clarify which mobx libs are not compatible with compiler (#32570)
## Summary

Right now, `react-compiler-healthcheck` flags `mobx` as a "known
incompatible library". But it's not precisely *MobX* that's
incompatible. It's the observer HOC that comes from `mobx-react` and
`mobx-react-lite`.

I've been working on
[mst-use-observable](https://github.com/coolsoftwaretyler/mst-use-observable),
which makes MobX-State-Tree compatible with the compiler. However,
projects that use `mobx-state-tree` and `mst-use-observable` will still
depend on `mobx` as a dependency.

And there [have been efforts in the past to write a hook for
observability](https://github.com/mobxjs/mobx/discussions/2566). So it's
possible that MobX could become compatible, so long as authors access it
with a hook, rather than the HOC.

I would like to propose updating the health check to be a little more
precise and flag the HOC dependencies, rather than MobX itself.

Thanks in advance for your consideration!

## How did you test this change?

`npx react-compiler-healthcheck` shouldn't flag on `mobx` in
dependencies, but will for `mobx-react-lite` and `mobx-react`.

Test suites, formatting, linting, all passed.

---------

Co-authored-by: lauren <poteto@users.noreply.github.com>
2025-03-13 11:46:26 -04:00
..
apps/playground feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
docs Update DEVELOPMENT_GUIDE.md (#32281) 2025-03-13 11:45:26 -04:00
fixtures [cleanup] Remove compiler runtime-compat fixture library (#31430) 2024-11-05 14:14:39 -05:00
packages fix: clarify which mobx libs are not compatible with compiler (#32570) 2025-03-13 11:46:26 -04:00
scripts [compiler] Migrate compiler packages to tsup (#32550) 2025-03-07 16:41:55 -05:00
.eslintrc.js [compiler:codegen] Wrap non-ascii characters in JsxExpressionContainer 2024-06-21 10:08:15 -04:00
.gitignore [forgive] Init (#31918) 2025-02-25 12:19:11 -05:00
package.json [compiler] Dedupe @babel/types (#32581) 2025-03-12 17:02:10 -04:00
README.md Update readme and other docs 2024-05-06 14:53:47 -07:00
yarn.lock feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -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.