mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This adds an `InlineJsxTransform` optimization pass, toggled by the `enableInlineJsxTransform` flag. When enabled, JSX will be transformed into React Element object literals, preventing runtime overhead during element creation. TODO: - [ ] Add conditionals to make transform PROD-only - [ ] Make the React element symbol configurable so this works with runtimes that support `react.element` or `react.transitional.element` - [ ] Look into additional optimization to pass props spread through directly if none of the properties are mutated
12 lines
420 B
TypeScript
12 lines
420 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
export {constantPropagation} from './ConstantPropagation';
|
|
export {deadCodeElimination} from './DeadCodeElimination';
|
|
export {pruneMaybeThrows} from './PruneMaybeThrows';
|
|
export {inlineJsxTransform} from './InlineJsxTransform';
|