{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\szabomarton\\\\Desktop\\\\Frontend\\\\Frontend\\\\25_01_07\\\\mai\\\\src\\\\Szamlalo.js\",\n _s = $RefreshSig$();\nimport React from \"react\";\nimport { useState, useEffect } from \"react\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nfunction Szamlalo() {\n _s();\n const [counter, setCounter] = useState(0);\n const [message, setMessage] = useState('');\n const [counter2, setCounter2] = useState(0);\n useEffect(() => {\n setMessage(`A számláló értéke: ${counter}`);\n console.log(`useEffect lefutott, mert a counter értéke ${counter}`);\n }, [counter]);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n children: [/*#__PURE__*/_jsxDEV(\"h1\", {\n children: \"React useEffect F\\xFCgg\\u0151s\\xE9g p\\xE9lda\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: message\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n onClick: () => setCounter(counter + 1),\n children: \"N\\xF6vel\\xE9s\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 20,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n onClick: () => setCounter(counter - 1),\n children: \"Cs\\xF6kkent\\xE9s\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 21,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n onClick: () => setCounter(0),\n children: \"Null\\xE1z\\xE1s\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 9\n }, this);\n}\n_s(Szamlalo, \"DHX4BODyQsijlUoZTh6+nTUwBu4=\");\n_c = Szamlalo;\nexport default Szamlalo;\nvar _c;\n$RefreshReg$(_c, \"Szamlalo\");","map":{"version":3,"names":["React","useState","useEffect","jsxDEV","_jsxDEV","Szamlalo","_s","counter","setCounter","message","setMessage","counter2","setCounter2","console","log","children","fileName","_jsxFileName","lineNumber","columnNumber","onClick","_c","$RefreshReg$"],"sources":["C:/Users/szabomarton/Desktop/Frontend/Frontend/25_01_07/mai/src/Szamlalo.js"],"sourcesContent":["import React from \"react\";\r\nimport { useState, useEffect } from \"react\";\r\n\r\nfunction Szamlalo() {\r\n const [counter, setCounter] = useState(0);\r\n const [message, setMessage] = useState('');\r\n const [counter2, setCounter2] = useState(0);\r\n\r\n useEffect(() => {\r\n setMessage(`A számláló értéke: ${counter}`);\r\n console.log(`useEffect lefutott, mert a counter értéke ${counter}`);\r\n }, [counter]);\r\n\r\n return (\r\n
{message}
\r\n \r\n \r\n \r\n