{"ScriptPreparationCode":"\r\nfunction ComponentWithInlineFunction() {\r\n const [state, setState] = React.useState(\u0027test\u0027);\r\n const clickMe = evt =\u003E {\r\n evt.preventDefault();\r\n console.log(state);\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 [state, setState] = React.useState(\u0027test\u0027);\r\n const clickMe = React.useCallback(evt =\u003E {\r\n evt.preventDefault();\r\n console.log(state);\r\n }, [state]);\r\n return React.createElement(\u0027button\u0027, {\r\n onClick: clickMe\r\n }, \u0027Click me!\u0027);\r\n}\r\n\r\nfunction ComponentWithInlineClick() {\r\n const [state, setState] = React.useState(\u0027test\u0027);\r\n\r\n return React.createElement(\u0027button\u0027, {\r\n onClick: (e) =\u003E {\r\n evt.preventDefault();\r\n console.log(state);\r\n },\r\n }, \u0027Click me!\u0027);\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":"Inline code","Code":"ReactDOM.render(React.createElement(ComponentWithInlineClick), document.getElementById(\u0027root\u0027))","IsDeferred":false}]}