2019-06-17から1日間の記事一覧
外部データから取得して一覧表示して、Like付けたり削除できたりできるところまで。 ファイル構成 . ├── App.js ├── Vidly.jsx ├── components │ ├── atoms │ │ └── Like.jsx │ └── molecules │ └── Movies.jsx ├── data │ └── services │ ├── fakeGenreServ…
カウンターコンポーネントを最終的にリファクタリングしたもの。 ファイル構成 . ├── App.jsx ├── components │ ├── Counter.jsx │ ├── Counters.jsx │ └── Navbar.jsx └── index.js ファイルの中身 App.jsx import React, { Component } from 'react' impor…
Lifecycle Hooks ReactのLifecycle hooksでよく用いられるものはだいたい次の通り。 Mount constructor render componentDidMount Update render componentDidUpdate Unmount componentDidUnmount Mounting phase constructor, render, componentDidMountの…
React復習がてら要点をまとめていく。 React学習3で学んだところから、さらに階層深くコンポーネント構成をする、次のようなケースの場合。 . ├── App.jsx ├── components │ ├── Counter.jsx │ ├── Counters.jsx │ └── Navbar.jsx └── index.js Objectやargu…