Frontend/25_01_07/mai/node_modules/.cache/babel-loader/e0f33e6c870cc4151d334d19fe24d0e3d034ed40bdacec0eeaaf16e04feb981d.json

1 line
6.1 KiB
JSON
Raw Normal View History

2025-01-28 10:38:27 +00:00
{"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)}>N