React feladat (2024. 12. 16. + 2024. 12. 17.)

This commit is contained in:
Tóth Ádám
2024-12-17 11:57:16 +01:00
parent 888977cca3
commit 7ed33229d7
32 changed files with 17787 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import React, { use } from "react";
import { useState } from "react";
function Kaka() {
let [gyumolcs, setGyumolcs] = useState("barack")
return (
<>
<p>{gyumolcs}</p>
<button onClick={() => setGyumolcs("kaka")}>Csá fasz</button>
</>
)
}
export default Kaka

View File

@@ -3,13 +3,15 @@ import ReactDOM from 'react-dom/client';
import './index.css';
// import App from './App';
import Auto from "./Auto"
import Kaka from "./Kaka"
import reportWebVitals from './reportWebVitals';
let auto1 = {szin: "narancs", marka: "Suzuki"}
let auto2 = {szin: "vörös", marka: "Fiat"}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<Auto auto1={auto1} auto2={auto2}/>
{/* <Auto auto1={auto1} auto2={auto2}/> */}
<Kaka />
</React.StrictMode>
);