## Input ```javascript import {StaticText1, Stringify, Text} from 'shared-runtime'; function Component(props) { const {buttons} = props; const [primaryButton, ...nonPrimaryButtons] = buttons; const renderedNonPrimaryButtons = nonPrimaryButtons.map((buttonProps, i) => ( )); return {renderedNonPrimaryButtons}; } const styles = { leftSecondaryButton: {left: true}, rightSecondaryButton: {right: true}, }; export const FIXTURE_ENTRYPOINT = { fn: Component, params: [ { buttons: [ {}, {type: 'submit', children: ['Submit!']}, {type: 'button', children: ['Reset']}, ], }, ], }; ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; import { StaticText1, Stringify, Text } from "shared-runtime"; function Component(props) { const $ = _c(2); const { buttons } = props; let t0; if ($[0] !== buttons) { const [, ...nonPrimaryButtons] = buttons; const renderedNonPrimaryButtons = nonPrimaryButtons.map(_temp); t0 = {renderedNonPrimaryButtons}; $[0] = buttons; $[1] = t0; } else { t0 = $[1]; } return t0; } function _temp(buttonProps, i) { return ( ); } const styles = { leftSecondaryButton: { left: true }, rightSecondaryButton: { right: true }, }; export const FIXTURE_ENTRYPOINT = { fn: Component, params: [ { buttons: [ {}, { type: "submit", children: ["Submit!"] }, { type: "button", children: ["Reset"] }, ], }, ], }; ``` ### Eval output (kind: ok)
StaticText1
{"type":"submit","children":["Submit!"],"style":{"left":true}}
{"type":"button","children":["Reset"],"style":{"right":true}}