-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b2bada
commit e4d027a
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './pages/App.tsx' | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import { App } from "./pages/App.tsx"; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
) | ||
</React.StrictMode> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import { CardProfile } from "../components/CardProfile"; | ||
|
||
function App() { | ||
export function App() { | ||
return ( | ||
<> | ||
<h1 style={{textAlign: "center"}}>Class Components</h1> | ||
<h1 style={{ textAlign: "center" }}>Class Components</h1> | ||
<CardProfile gitHub={"EmanuelQuintino"} name={"Emanuel Quintino"} age={30} /> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type User = { | ||
name: string; | ||
age: number; | ||
}; | ||
|
||
function user(user: User) { | ||
console.log(user); | ||
console.log(user.name); | ||
console.log(user.age); | ||
} | ||
|
||
user({ name: "Emanuel", age: 30 }); |