{"ScriptPreparationCode":"const Factoid = ({ variant = \u0022default\u0022, width = \u0022auto\u0022, height = \u0022auto\u0022 }) =\u003E {\r\n\tconst widthStr = typeof width === \u0022number\u0022 ? \u0060${width}px\u0060 : width;\r\n\tconst heightStr = typeof height === \u0022number\u0022 ? \u0060${height}px\u0060 : height;\r\n\tconst variantAttr = variant === \u0022default\u0022 ? \u0022regular\u0022 : \u0022bold\u0022;\r\n\r\n\treturn (\r\n\t\t\u003Cdiv\u003E\r\n\t\t\t\u003Cdiv\u003E{widthStr}\u003C/div\u003E\r\n\t\t\t\u003Cdiv\u003E{heightStr}\u003C/div\u003E\r\n\t\t\t\u003Cdiv\u003E{variantAttr}\u003C/div\u003E\r\n\t\t\u003C/div\u003E\r\n\t);\r\n};\r\n\r\nconst FactoidMemo = ({\r\n\tvariant = \u0022default\u0022,\r\n\twidth = \u0022auto\u0022,\r\n\theight = \u0022auto\u0022,\r\n}) =\u003E {\r\n\tconst widthStr = React.useMemo(\r\n\t\t() =\u003E (typeof width === \u0022number\u0022 ? \u0060${width}px\u0060 : width),\r\n\t\t[width],\r\n\t);\r\n\tconst heightStr = React.useMemo(\r\n\t\t() =\u003E (typeof height === \u0022number\u0022 ? \u0060${height}px\u0060 : height),\r\n\t\t[height],\r\n\t);\r\n\tconst variantAttr = React.useMemo(\r\n\t\t() =\u003E (variant === \u0022default\u0022 ? \u0022regular\u0022 : \u0022bold\u0022),\r\n\t\t[variant],\r\n\t);\r\n\r\n\treturn (\r\n\t\t\u003Cdiv\u003E\r\n\t\t\t\u003Cdiv\u003E{widthStr}\u003C/div\u003E\r\n\t\t\t\u003Cdiv\u003E{heightStr}\u003C/div\u003E\r\n\t\t\t\u003Cdiv\u003E{variantAttr}\u003C/div\u003E\r\n\t\t\u003C/div\u003E\r\n\t);\r\n};\r\n\r\nconst Wrapper = ({ children }) =\u003E {\r\n\tconst [count, setCount] = React.useState(0);\r\n\r\n\tReact.useEffect(() =\u003E {\r\n\t\tif (count \u003C 10000) {\r\n\t\t\tsetCount((c) =\u003E c \u002B 1);\r\n\t\t}\r\n\t}, [count]);\r\n\r\n\treturn \u003Cdiv\u003E{children}\u003C/div\u003E;\r\n};\r\n\r\nconst App = () =\u003E {\r\n\treturn \u003CWrapper\u003E\r\n\t\t\u003CFactoid /\u003E\r\n\t\u003C/Wrapper\u003E\r\n}\r\n\r\nconst MemoizedApp = () =\u003E {\r\n\treturn \u003CWrapper\u003E\r\n\t\t\u003CFactoidMemo /\u003E\r\n\t\u003C/Wrapper\u003E\r\n}","TestCases":[{"Name":"Memoized App","Code":"ReactDOM.render(\u003CMemoizedApp /\u003E, document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Default App ","Code":"ReactDOM.render(\u003CApp /\u003E, document.getElementById(\u0027root\u0027))","IsDeferred":false}]}