{"ScriptPreparationCode":"const mockItems = Array(6)\r\n\t.fill(\u0022\u0022)\r\n\t.map((_value, index) =\u003E ({\r\n\t\tid: index \u002B 1,\r\n\t\tsrc: \u0022\u0022,\r\n\t}));\r\n\r\n\r\nconst Demo = ({isMobile = true}={}) =\u003E {\r\n const [items, setItems] = React.useState(mockItems);\r\n\r\n const itemsToShow = items.slice(0, isMobile ? 6 : 5);\r\n\r\n return React.createElement(\r\n \u0022div\u0022,\r\n null,\r\n React.createElement(\u0022div\u0022, null, itemsToShow.map(i=\u003Ei.id)),\r\n );\r\n};\r\n\r\nconst MemoizedDemo = ({isMobile = true}={}) =\u003E {\r\n const [items, setItems] = React.useState(mockItems);\r\n\r\n const itemsToShow = React.useMemo(()=\u003Eitems.slice(0, isMobile ? 6 : 5),[items, isMobile]);\r\n\r\n return React.createElement(\r\n \u0022div\u0022,\r\n null,\r\n React.createElement(\u0022div\u0022, null, itemsToShow.map(i=\u003Ei.id)),\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(Demo, 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(MemoizedDemo, 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}]}