{"ScriptPreparationCode":"function ComponentWithInlineFunction() {\r\n const clickMe = () =\u003E {\r\n }\r\n return React.createElement(\u0027button\u0027, {\r\n onClick: clickMe\r\n }, \u0027Click me!\u0027)\r\n}\r\n\r\nfunction ComponentWithUseCallback() {\r\n const clickMe = React.useCallback(() =\u003E {\r\n }, [])\r\n return React.createElement(\u0027button\u0027, {\r\n onClick: clickMe\r\n }, \u0027Click me!\u0027)\r\n}\r\n\r\nfunction ComponentWithoutUseMemo() {\r\n const obj = {\r\n x: 1,\r\n y: 1\r\n }\r\n return React.createElement(\u0027h1\u0027, {\r\n data: obj\r\n }, \u0027ComponentWithoutUseMemo\u0027)\r\n}\r\n\r\nfunction ComponentWithUseMemo() {\r\n const obj = React.useMemo(() =\u003E ({\r\n x: 1,\r\n y: 1\r\n }), [])\r\n return React.createElement(\u0027h1\u0027, {\r\n data: obj\r\n }, \u0027ComponentWithUseMemo\u0027)\r\n}\r\n\r\nconst ChildWithoutMemo = () =\u003E {\r\n return React.createElement(\u0027div\u0027, null, null)\r\n}\r\n\r\nconst ChildWithMemo = React.memo(ChildWithoutMemo)\r\n\r\nfunction ComponentWithoutMemorizedChild() {\r\n const [count, setCount] = React.useState(0)\r\n React.useEffect(() =\u003E {\r\n if (count \u003C 10000) {\r\n setCount(c =\u003E c \u002B 1)\r\n }\r\n })\r\n return React.createElement(ChildWithoutMemo, null, null)\r\n}\r\n\r\nfunction ComponentWithMemorizedChild() {\r\n const [count, setCount] = React.useState(0)\r\n React.useEffect(() =\u003E {\r\n if (count \u003C 10000) {\r\n setCount(c =\u003E c \u002B 1)\r\n }\r\n })\r\n return React.createElement(ChildWithMemo, null, null)\r\n}\r\n","TestCases":[{"Name":"Inline Function","Code":"ReactDOM.render(React.createElement(ComponentWithInlineFunction), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Hooks","Code":"ReactDOM.render(React.createElement(ComponentWithUseCallback), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Without useMemo","Code":"ReactDOM.render(React.createElement(ComponentWithoutUseMemo), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"With useMemo","Code":"ReactDOM.render(React.createElement(ComponentWithUseMemo), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Child without memo","Code":"ReactDOM.render(React.createElement(ComponentWithoutMemorizedChild), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"Child with memo","Code":"ReactDOM.render(React.createElement(ComponentWithMemorizedChild), document.getElementById(\u0027root\u0027))","IsDeferred":false}]}