This file contains hidden or 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
import * as React from "react"; | |
import { Card, Row, Input, Text } from "./components"; | |
import ThemeContext from "./ThemeContext"; | |
export default function Greeting(props) { | |
let theme = useContext(ThemeContext); | |
let [name, setName] = useState("Harry"); | |
let [surname, setSurname] = useState("Potter"); | |
useEffect(() => { |
This file contains hidden or 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
import * as React from "react"; | |
import { Card, Row, Input, Text } from "./components"; | |
import ThemeContext from "./ThemeContext"; | |
export default class Greeting extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
name: "Harry", | |
surname: "Potter", |
This file contains hidden or 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
const Coin = () => ( | |
<div> | |
Bitcoin | |
<ul className="crypto"> | |
<li className="crypto__acronym">Acronym: BTC</li> | |
<li className="crypto__value">Current value: 8.800 $</li> | |
<li className="crypto__cap">Market cap: 2,3 mld</li> | |
</ul> | |
</div> | |
); |
This file contains hidden or 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
const Coin = () => ( | |
<div></div> | |
<div></div> | |
); |
This file contains hidden or 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
import React, { Component } from "react"; | |
import "./App.css"; | |
import Coin from "../components/CoinList/Coin/Coin"; | |
class App extends Component { | |
render() { | |
return ( | |
<div> | |
<Coin /> |
This file contains hidden or 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
const Coin = () => ( | |
<div></div> | |
); |
This file contains hidden or 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
import React from "react"; | |
const Coin = () => { | |
return ( | |
<div></div> | |
); | |
}; | |
export default Coin; |
This file contains hidden or 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
import React from "react"; | |
const Coin = () => { | |
return ( | |
<div></div> | |
); | |
}; |
This file contains hidden or 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
import React from "react"; |
This file contains hidden or 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
const usdToPlnRate = 3.35030; | |
const usdToPlnEl = `1 dolar jest warty {usdToPlnRate.toFixed(2)} złotych`. | |
ReactDOM.render(usdToPlnEl, document.querySelector("#root")); | |
// index.html | |
<div id="root">1 dolar jest warty 3.35 złotych.</div> |