diff --git a/examples/react-concepts/src/App.css b/examples/react-concepts/src/App.css index 74b5e05..e550032 100644 --- a/examples/react-concepts/src/App.css +++ b/examples/react-concepts/src/App.css @@ -1,38 +1,5 @@ .App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; + background-color: bisque; min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } + font-size: 1.5rem; } diff --git a/examples/react-concepts/src/App.js b/examples/react-concepts/src/App.js index 3784575..586cc28 100644 --- a/examples/react-concepts/src/App.js +++ b/examples/react-concepts/src/App.js @@ -1,23 +1,24 @@ -import logo from './logo.svg'; -import './App.css'; +import React, { useState } from "react"; +import Input from "./components/class/Input"; +import "./App.css"; function App() { + const [state, setState] = useState("default"); + + + return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
+
+ + + +

{state}

); } diff --git a/examples/react-concepts/src/components/class/Input.jsx b/examples/react-concepts/src/components/class/Input.jsx new file mode 100644 index 0000000..7993700 --- /dev/null +++ b/examples/react-concepts/src/components/class/Input.jsx @@ -0,0 +1,18 @@ +import React, { Component } from "react"; + +class Input extends Component { + constructor() {} + //state = "default"; + + /*function handleChange(event) { + console.log(event.target.value); + //setState(event.target.value); + //console.log("state", state); + }*/ + + render() { + return ; + } +} + +export default Input; diff --git a/examples/react-concepts/src/index.js b/examples/react-concepts/src/index.js index d563c0f..770ee7d 100644 --- a/examples/react-concepts/src/index.js +++ b/examples/react-concepts/src/index.js @@ -1,10 +1,10 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import "./index.css"; +import App from "./App"; +import reportWebVitals from "./reportWebVitals"; -const root = ReactDOM.createRoot(document.getElementById('root')); +const root = ReactDOM.createRoot(document.getElementById("root")); root.render(