You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In custom rendering scenarios, stringified static nodes are not very friendly because most custom rendering environments are not browser-based. To render these nodes, an HTML parsing tool would need to be introduced at runtime. This makes transformHoist counterproductive, as the overhead outweighs the benefits.
If it were possible to disable transformHoist via configuration while retaining the cacheStatic functionality, it would be beneficial for custom rendering. The final transformed code would look like this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
By default, when
hoistStaticis enabled, eligible hoisted static trees are turned into stringified static nodes, as shown below:source code:
Compiled Code:
In custom rendering scenarios, stringified static nodes are not very friendly because most custom rendering environments are not browser-based. To render these nodes, an HTML parsing tool would need to be introduced at runtime. This makes
transformHoistcounterproductive, as the overhead outweighs the benefits.If it were possible to disable
transformHoistvia configuration while retaining thecacheStaticfunctionality, it would be beneficial for custom rendering. The final transformed code would look like this:Beta Was this translation helpful? Give feedback.
All reactions