1 line
6.1 KiB
JSON
1 line
6.1 KiB
JSON
{"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}, A számláló2 értéke: ${counter2}`);\n console.log(`useEffect lefutott, mert a counter értéke ${counter}`);\n console.log(`useEffect lefutott, mert a counter értéke ${counter2}`);\n }, [counter, counter2]);\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: 17,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: message\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: \"N\\xF6vel\\xE9s\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\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: 23,\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: 24,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n onClick: () => setCounter2(counter),\n children: \"Sz\\xE1ml\\xE1l\\xF32 = sz\\xE1ml\\xE1l\\xF3\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n onClick: () => {\n setCounter(0);\n setCounter2(0);\n },\n children: \"Mind a kett\\u0151 Null\\xE1z\\xE1sa\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 16,\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}, A számláló2 értéke: ${counter2}`);\r\n console.log(`useEffect lefutott, mert a counter értéke ${counter}`);\r\n console.log(`useEffect lefutott, mert a counter értéke ${counter2}`);\r\n }, [counter, counter2]);\r\n\r\n return (\r\n <div>\r\n <h1>\r\n React useEffect Függőség példa\r\n </h1>\r\n <p>{message}</p>\r\n\r\n <button onClick={() => setCounter(counter + 1)}>Növelés</button>\r\n <button onClick={() => setCounter(counter - 1)}>Csökkentés</button>\r\n <button onClick={() => setCounter(0)}>Nullázás</button>\r\n <button onClick={() => setCounter2(counter)}>Számláló2 =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