{"ScriptPreparationCode":"const Factoid = ({ variant = \u0022default\u0022, width = \u0022auto\u0022, height = \u0022auto\u0022 }) =\u003E {\r\n const widthStr = typeof width === \u0022number\u0022 ? \u0060${width}px\u0060 : width;\r\n const heightStr = typeof height === \u0022number\u0022 ? \u0060${height}px\u0060 : height;\r\n const variantAttr = variant === \u0022default\u0022 ? \u0022regular\u0022 : \u0022bold\u0022;\r\n\r\n return React.createElement(\r\n \u0022div\u0022,\r\n null,\r\n React.createElement(\u0022div\u0022, null, widthStr),\r\n React.createElement(\u0022div\u0022, null, heightStr),\r\n React.createElement(\u0022div\u0022, null, variantAttr)\r\n );\r\n};\r\n\r\nconst FactoidMemo = ({\r\n variant = \u0022default\u0022,\r\n width = \u0022auto\u0022,\r\n height = \u0022auto\u0022,\r\n}) =\u003E {\r\n const widthStr = React.useMemo(\r\n () =\u003E (typeof width === \u0022number\u0022 ? \u0060${width}px\u0060 : width),\r\n [width]\r\n );\r\n const heightStr = React.useMemo(\r\n () =\u003E (typeof height === \u0022number\u0022 ? \u0060${height}px\u0060 : height),\r\n [height]\r\n );\r\n const variantAttr = React.useMemo(\r\n () =\u003E (variant === \u0022default\u0022 ? \u0022regular\u0022 : \u0022bold\u0022),\r\n [variant]\r\n );\r\n\r\n return React.createElement(\r\n \u0022div\u0022,\r\n null,\r\n React.createElement(\u0022div\u0022, null, widthStr),\r\n React.createElement(\u0022div\u0022, null, heightStr),\r\n React.createElement(\u0022div\u0022, null, variantAttr)\r\n );\r\n};\r\n\r\nconst Wrapper = ({ children }) =\u003E {\r\n const [count, setCount] = React.useState(0);\r\n\r\n React.useEffect(() =\u003E {\r\n if (count \u003C 10000) {\r\n setCount((c) =\u003E c \u002B 1);\r\n }\r\n }, [count]);\r\n\r\n return React.createElement(\u0022div\u0022, null, children);\r\n};\r\n\r\nfunction App () {\r\n return React.createElement(\r\n Wrapper,\r\n null,\r\n React.createElement(Factoid, null)\r\n );\r\n};\r\n\r\nfunction MemoizedApp() {\r\n return React.createElement(\r\n Wrapper,\r\n null,\r\n React.createElement(FactoidMemo, null)\r\n );\r\n};","TestCases":[{"Name":"Memoized App","Code":"ReactDOM.render(React.createElement(MemoizedApp), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Default App ","Code":"ReactDOM.render(React.createElement(App), document.getElementById(\u0027root\u0027))","IsDeferred":false}]}