Learning React(8.React開発環境の構成)
5344 ワード
1.React開発環境の構成
01.Create Reactとの初対面
create react app github : https://github.com/facebook/create-react-app
node : https://nodejs.org/ko/

-1. npm install -g create-react-app

-2.レスポンス項目の作成

-3.反応項目の実行




-4、反応項目の配置




02.HelloWorldアプリケーションの開発
-1. src / index.jsの作成
import React from "react";
import ReactDom from "react-dom";
import HelloWorld from "./HelloWorld";
ReactDom.render(
<HelloWorld />
, document.getElementById("root")
);

-2. src / HelloWorld.jsの作成
import React, { Component } from "react";
class HelloWorld extends Component {
render() {
return (
<div className="helloContainer">
<h1>Hello, World!</h1>
</div>
);
}
}
export default HelloWorld;


-3.styleを適用してみます!
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
}

h1 {
font-family: sans-serif;
font-size: 56px;
padding: 5px 15px;
margin: 0;
background: linear-gradient(to bottom, white 0%, white 62%, gold 62%, gold 100%);
}


03.雲英バージョンの構築
-1.プロジェクト終了

-2. buld

-3. serve test
npm install -g serve
serve -s build


Reference
この問題について(Learning React(8.React開発環境の構成)), 我々は、より多くの情報をここで見つけました https://velog.io/@ansalstmd/Learning-React8.-React-개발환경-구성テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol