此博客已经归档。访问 zh-hans.react.dev/blog 查看最新的文章。
Today we’re announcing the deprecation of react-tools and JSTransform.
react-tools has always been a very thin wrapper around JSTransform. It has served as a great tool for the community to get up and running, but at this point we’re ready to let it go. We won’t ship a new version for v0.14.
We’ve been working with the Babel team as we started making use of it and we’re confident that it will be the right tool to use with React.
As a result of no longer maintaining JSTransform, we no longer have a need to maintain our Esprima fork (esprima-fb). The upstream Esprima and other esprima-based forks, like Espree, have been doing an excellent job of supporting new language features recently. If you have a need of an esprima-based parser, we encourage you to look into using one of those.
JSXTransformer is another tool we built specifically for consuming JSX in the browser. It was always intended as a quick way to prototype code before setting up a build process. It would look for
<script> tags with
type="text/jsx" and then transform and run. This ran the same code that react-tools ran on the server. Babel ships with a nearly identical tool, which has already been integrated into JS Bin.
We’ll be deprecating JSXTransformer, however the current version will still be available from various CDNs and Bower.