0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Reactのお勉強

Last updated at Posted at 2020-05-03

React学習内容(備忘録)

Projectの始め方

  1. Node.jsをインストールする。
    [link]https://nodejs.org/ja/
$ node --version    #バージョンが表示されることを確認する。
v12.7.0
$ npx create-react-app "プロジェクト名"
$ cd "プロジェクト名"
$ npm start

基本事項

  • <head>タグに以下を追加する。
    <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  • エレメントの作成
React.createElement(タグ名,属性,中に組み込まれるもの);
  • レンダリングした表示の作成
ReactDOM.render(エレメント,DOM);

レンダリングとは、プログラムのオブジェクトを具体的に目に見えるような形に変換する作業

Redux

npm install --save redux
npm install --save react-redux
npm install --save redux-persist

Redux Persist

データの永続化を行う。
Redux PersistはReduxのストアのデータをローカルストレージに保存する。
ページにアクセスしてロードするとき、それを読み込み利用する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?