dillon1000/react

Commit

Extract Fizz instruction set to build macro (#25457)

We're adding an option to Fizz to support an alternate output format
that doesn't rely on inline script tags (see #25437). The two outputs
will share the same "instruction set" of functions. These functions are
currently inlined into the source file; to make this a bit more maintainable,
and eventually have a single source of truth, in preparation for the new option,
this commit moves the instruction set to a separate files that are imported.

In the future, we could improve this further by running Closure on the
instruction set and generating it at build time. This isn't an urgent
improvement, though, because we rarely modify the instruction set.

Co-authored-by: Mofei Zhang <[email protected]>

Co-authored-by: Mofei Zhang <[email protected]>
Browse files
Changed paths5 files
First-parent comparison
M packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js ModifiedA packages/react-dom-bindings/src/server/fizz-instruction-set/clientRenderFunctionString.js AddedA packages/react-dom-bindings/src/server/fizz-instruction-set/completeBoundaryFunctionString.js AddedA packages/react-dom-bindings/src/server/fizz-instruction-set/completeSegmentFunctionString.js AddedA packages/react-dom-bindings/src/server/fizz-instruction-set/styleInsertionFunctionString.js Added
Patch

Files changed

Rendering syntax-highlighted changes…