Hello world

Jaeseok Hanยท2023๋…„ 8์›” 21์ผ
0

ํ”„๋กœ์ ํŠธ ์„ธํŒ…

1) npx ์‚ฌ์šฉ๋ฐฉ๋ฒ•

npx create-react-app <ํ”„๋กœ์ ํŠธ_์ด๋ฆ„>

๐Ÿ’กnpx๋ž€?
npm package runner ์ด๋‹ค.

2) npm ์‚ฌ์šฉ๋ฐฉ๋ฒ•

npm install create-react-app -g
creat-react-app <ํ”„๋กœ์ ํŠธ_์ด๋ฆ„>

๋‘๊ฐ€์ง€ ๋ชจ๋‘ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋‹ค.

ํ”„๋กœ์ ํŠธ ๊ตฌ๋™

npm run start

localhost:3000 ์— ๋ฆฌ์•กํŠธ ์›น ์‚ฌ์ดํŠธ๊ฐ€ ๊ตฌ๋™๋˜๋Š”๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

Hello World ํ‘œ์ถœํ•ด๋ณด๊ธฐ

App.js

import logo from './logo.svg';
import './App.css';

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          Hello World
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
      </header>
    </div>
  );
}

export default App;

Hello World๊ฐ€ ์ž˜ ๋ณด์ธ๋‹ค!

0๊ฐœ์˜ ๋Œ“๊ธ€