{"ScriptPreparationCode":"function ComponentWithoutUseMemo({method}) {\r\n if (method \u0026\u0026 method.method_status_id === \u0022voided\u0022 ) return React.createElement(\u0027div\u0027, {}, \u0027Voided\u0027);\r\n \r\n return React.createElement(\u0027div\u0027, {}, \u0027Not voided\u0027);\r\n}\r\n\r\nfunction ComponentWithUseMemo({method}) {\r\n\tconst voided = React.useMemo(() =\u003E {\r\n if (!method) return false;\r\n return method.method_status_id === \u0022voided\u0022;\r\n }, [method]);\r\n \r\n if (voided) return React.createElement(\u0027div\u0027, {}, \u0027Voided\u0027);\r\n \r\n \treturn React.createElement(\u0027div\u0027, {}, \u0027Not voided\u0027);\r\n}","TestCases":[{"Name":"Without useMemo","Code":"ReactDOM.render(React.createElement(ComponentWithoutUseMemo, { method: { method_status_id: \u0022voided\u0022 }}), document.getElementById(\u0027root\u0027))","IsDeferred":false},{"Name":"With useMemo","Code":"ReactDOM.render(React.createElement(ComponentWithUseMemo, { method: { method_status_id: \u0022voided\u0022 }}), document.getElementById(\u0027root\u0027))","IsDeferred":false}]}