{"id":3683,"date":"2016-11-22T09:00:42","date_gmt":"2016-11-22T00:00:42","guid":{"rendered":"http:\/\/sitest.jp\/blog\/?p=3683"},"modified":"2016-11-18T16:54:48","modified_gmt":"2016-11-18T07:54:48","slug":"1%e5%88%86%e3%81%a7react%e3%81%ae%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83%e3%82%92%e6%a7%8b%e7%af%89%e3%81%a7%e3%81%8d%e3%82%8b%e3%80%8ccreate-react-app%e3%80%8d%e3%81%a8%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/sitest.jp\/blog\/?p=3683","title":{"rendered":"1\u5206\u3067React\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3067\u304d\u308b\u300cCreate React App\u300d\u3068\u306f\uff1f"},"content":{"rendered":"<p>\u300c\u4eca\u5e74\u3001\u30c8\u30ec\u30f3\u30c9\u306eReact\u3092\u89e6\u3063\u3066\u307f\u305f\u3044\u300d\u3068\u601d\u3063\u3066\u3044\u3066\u3082\u3001\u307e\u305a\u958b\u767a\u74b0\u5883\u3092\u4f5c\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u969c\u58c1\u304b\u3089\u3001\u65ad\u5ff5\u3055\u308c\u308b\u304b\u305f\u3082\u591a\u3044\u306e\u3067\u306f\u306a\u3044\u306e\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u958b\u767a\u74b0\u5883\u306e\u69cb\u7bc9\u3092\u3059\u3063\u98db\u3070\u3057\u3066\u3068\u308a\u3042\u3048\u305a\u89e6\u308a\u305f\u3044\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u4eca\u56de\u306fReact\u306e\u958b\u767a\u74b0\u5883\u30921\u5206\u3067\u69cb\u7bc9\u3067\u304d\u308bFacebook\u304c\u516c\u958b\u3057\u305f\u30d3\u30eb\u30c9\u74b0\u5883\u300cCreate React App\u300d\u3092\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u300cCreate React App\u300d \u3068\u306f\uff1f<\/h3>\n<\/div>\n<p><img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2016\/08\/Ract.png\" alt=\"Create React App\" width=\"500\" height=\"300\" class=\"alignnone size-full wp-image-3736\" \/><\/p>\n<p>\u958b\u767a\u3068\u904b\u7528\u306e\u305f\u3081\u306e\u8907\u96d1\u306a\u8a2d\u5b9a\u306a\u3057\u306b<br \/>\nReact\u3092\u5229\u7528\u3057\u305f\u958b\u767a\u304c\u884c\u3048\u308b\u30d3\u30eb\u30c9\u74b0\u5883\u3067\u3059\u3002<\/p>\n<p>\u5f8c\u307b\u3069\u8aac\u660e\u3057\u307e\u3059\u304c\u3001Webpack, Babel ,ESLint\u3068\u3044\u3063\u305f\u6280\u8853\u304c\u3001<br \/>\n\u642d\u8f09\u3055\u308c\u3066\u304a\u308a\u3001JSX\u3084ES6\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ed6\u306b\u3082JavaScript\u304b\u3089\u76f4\u63a5\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3084CSS\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u304c\u53ef\u80fd\u3067\u3042\u308a\u3001CSS\u306e\u63a5\u982d\u8a9e\u81ea\u52d5\u4ed8\u4e0e\u306a\u3069\u306e\u6a5f\u80fd\u3082\u5099\u3048\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">3\u30b9\u30c6\u30c3\u30d7\u3067React\u30a2\u30d7\u30ea\u3092\u7acb\u3061\u4e0a\u3052\u3066\u307f\u3088\u3046<\/h3>\n<\/div>\n<p>\u305d\u308c\u3067\u306f\u3001\u624b\u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">\u30b9\u30c6\u30c3\u30d71 npm\u3067\u300cCreate React App\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u3088\u3046\uff01<\/h4>\n<p>\u300cCreate React App\u300d\u306fnpm\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001<br \/>\n\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u305f\u305f\u304f\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>npm install create-react-app\n<\/code><\/pre>\n<p>\u3059\u308b\u3068\u3001[node_modules]\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b<br \/>\n\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u306d\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">\u30b9\u30c6\u30c3\u30d72 React\u30a2\u30d7\u30ea\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3088\u3046\uff01<\/h4>\n<p>\u3053\u3061\u3089\u3082\u30ef\u30f3\u30b3\u30de\u30f3\u30c9\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>create-react-app &lt;\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d&gt;\n<\/code><\/pre>\n<p>&lt;\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d>\u306b\u6307\u5b9a\u3057\u305f\u540d\u524d\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c<br \/>\n\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u4f8b\u3067\u306f\u3001[react_app] \u3068\u3057\u307e\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u3092\u305f\u305f\u304f\u3068[react_app]\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u306d\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001\u958b\u767a\u74b0\u5883\u306e\u5b8c\u6210\u3067\u3059!<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">\u30b9\u30c6\u30c3\u30d73 React\u30a2\u30d7\u30ea\u3092\u7acb\u3061\u4e0a\u3052\u3088\u3046\uff01<\/h4>\n<pre><code>cd react_app\n<\/code><\/pre>\n<p>\u306e\u3088\u3046\u306b\u4f5c\u6210\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>npm start\n<\/code><\/pre>\n<p>\u3068\u3059\u308b\u3068\u3001React\u30a2\u30d7\u30ea\u304c\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3057\u305f\u306d\u3002<\/p>\n<p><img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2016\/08\/ss_4-1024x450.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8_4\" width=\"604\" height=\"265\" class=\"alignnone size-large wp-image-3748\" \/><\/p>\n<p>React\u30a2\u30d7\u30ea\u7acb\u3061\u4e0a\u3052\u307e\u3067\u306e\u30b3\u30de\u30f3\u30c9\u3092\u307e\u3068\u3081\u308b\u3068<\/p>\n<pre><code>npm install create-react-app\n\u2193\ncreate-react-app &lt;\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d&gt;\n\u2193\nnpm start\n<\/code><\/pre>\n<p>\u306e3\u30b9\u30c6\u30c3\u30d7\u3067\u30a2\u30d7\u30ea\u3092\u7acb\u3061\u4e0a\u3052\u308c\u307e\u3059\u3002<\/p>\n<p>src\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306eApp.js\u3092\u7de8\u96c6\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3001<br \/>\n\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u3084\u30c6\u30ad\u30b9\u30c8\u306e\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>npm run build\n<\/code><\/pre>\n<p>\u3068\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068\u3001<br \/>\n\u305d\u306e\u307e\u307e\u30a2\u30c3\u30d7\u3059\u308c\u3070\u3001\u516c\u958b\u3067\u304d\u308b<br \/>\nbuild\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u751f\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u69cb\u7bc9\u304b\u3089\u7acb\u3061\u4e0a\u3052\u3001\u516c\u958b\u307e\u3067\u3092\u7c21\u5358\u306b\u884c\u306a\u3048\u307e\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">Create React App \u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u6280\u8853<br \/>\n<\/h3>\n<\/div>\n<p>Create React App \u3067\u69cb\u7bc9\u74b0\u5883\u306b\u306f\u3069\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">webpack<\/h4>\n<p>\u6700\u9069\u306a\u5f62\u306b\u4f5c\u308a\u5909\u3048\u308b\u70ba\u306e\u30c4\u30fc\u30eb\uff08\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\uff09\u3067\u3059\u3002<br \/>\nJade\u3092HTML\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304f\u308c\u305f\u308a\u3001<br \/>\nCoffeeScript\u3092JavaScript\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304f\u308c\u305f\u308a\u3001<br \/>\n\u753b\u50cf\u3084\u30d5\u30a1\u30a4\u30eb\u3092minify\u3057\u3066\u304f\u308c\u305f\u308a\u3082\u3057\u307e\u3059\u3002<\/p>\n<p>Create React App \u3067\u306fES2016\u3084JSX\u306e\u30c8\u30e9\u30f3\u30b9\u30d1\u30a4\u30eb\u306a\u3069\u3067<br \/>\n\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">webpack-dev-server<\/h4>\n<p>webpack\u7528\u306e\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3092\u7528\u610f\u3057\u3066\u304f\u308c\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30fc\u30ab\u30eb\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u3066\u304f\u308c\u3001<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u969b\u306f\u691c\u77e5\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u3092\u81ea\u52d5\u7684\u306b\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>Create React App \u306e\u74b0\u5883\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u969b\u306b\u3001<br \/>\n\u3059\u3050\u306b\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u308b\u306e\u306f\u3001webpack-dev-server \u304c\u30a6\u30a9\u30c3\u30c1\u3057\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">style-loader<\/h4>\n<p>Javascript\u306e\u30b3\u30fc\u30c9\u4e2d\u3067stylesheet\u3092require\u51fa\u6765\u308b\u3088\u3046\u306b\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u4f55\u304c\u4fbf\u5229\u304b\u3068\u3044\u3046\u3068\u3001\u90e8\u54c1\u8981\u7d20\u306b\u5fc5\u8981\u306a\u30b9\u30bf\u30a4\u30eb\u3092\u3001<br \/>\n\u5fc5\u8981\u306a\u6642\u3060\u3051\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001<br \/>\n\u30ea\u30af\u30a8\u30b9\u30c8\u6570\u3092\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">Babel<\/h4>\n<p>ES6\u3084ES7, JSX\u3092\u30c8\u30e9\u30f3\u30b9\u30d1\u30a4\u30eb\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u6b21\u4e16\u4ee3\u306eJavaScript\u306eES6\u3084ES7\u3092\u4f7f\u304a\u3046\u306b\u3082\u3001<br \/>\n\u4e00\u90e8\u306e\u30d6\u30e9\u30a6\u30b6\u304cES5\u307e\u3067\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u306a\u3044\u3053\u3068\u3092\u8003\u616e\u3057\u3066\u3001<br \/>\n\u958b\u767a\u3055\u308c\u305f\u306e\u304cBabel\u3067\u3059\u3002<\/p>\n<p>Create React App\u3067ES6\u3084JSX(ES7\u306f\u8a2d\u5b9a\u3068\u3057\u3066\u672a\u5bfe\u5fdc)\u3092\u4f7f\u7528\u3067\u304d\u308b\u306e\u306f\u3001<br \/>\nBabel\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h4 style=\"border-bottom: solid 4px #73bc9b; margin-bottom: 30px;\">ESLint<\/h4>\n<p>\u69cb\u6587\u306b\u30df\u30b9\u304c\u306a\u3044\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u308c\u308b\u9759\u7684\u691c\u8a3c\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u7279\u8272\u3068\u3057\u3066\u306f\u3001\u7c21\u5358\u306b\u69cb\u6587\u30c1\u30a7\u30c3\u30af\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u306e\u3068\u3001<br \/>\nES6, ES7, JSX\u306e\u8a18\u6cd5\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>Create React App\u3067\u306f\u3001<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u5909\u66f4\u3057\u305f\u969b\u306b\u3001\u69cb\u6587\u306b\u30df\u30b9\u304c\u3042\u308b\u3068\u3001<br \/>\n\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u306f\u3044\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>ES6, JSX\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308bESLint\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u307e\u3068\u3081<\/h3>\n<\/div>\n<p>\u4eca\u56de\u306f\u300cCreate React App\u300d\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u958b\u767a\u74b0\u5883\u3092\u3059\u3050\u69cb\u7bc9\u3057\u3066\u3001<br \/>\nReact\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u4eca\u5e74\u3001\u30c8\u30ec\u30f3\u30c9\u306eReact\u3092\u89e6\u3063\u3066\u307f\u305f\u3044\u300d\u3068\u601d\u3063\u3066\u3044\u3066\u3082\u3001\u307e\u305a\u958b\u767a\u74b0\u5883\u3092\u4f5c\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3068\u3044\u3046\u969c\u58c1\u304b\u3089\u3001\u65ad\u5ff5\u3055\u308c\u308b\u304b\u305f\u3082\u591a\u3044\u306e\u3067\u306f\u306a\u3044\u306e\u3057\u3087\u3046\u304b\uff1f \u958b\u767a\u74b0\u5883\u306e\u69cb\u7bc9\u3092\u3059\u3063\u98db\u3070\u3057\u3066\u3068\u308a\u3042\u3048\u305a\u89e6\u308a\u305f\u3044\u3067\u3059\u3088\u306d\u3002 \u305d\u3053\u3067\u4eca\u56de\u306fReact\u306e\u958b\u767a\u74b0\u5883\u30921\u5206\u3067\u69cb\u7bc9\u3067\u304d\u308bFacebook\u304c\u516c\u958b\u3057\u305f\u30d3\u30eb\u30c9\u74b0\u5883\u300cCreate React App\u300d\u3092\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":3736,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36,27],"tags":[],"acf":false,"_links":{"self":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/3683"}],"collection":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/comments?post=3683"}],"version-history":[{"count":23,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/3683\/revisions"}],"predecessor-version":[{"id":3719,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/3683\/revisions\/3719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media\/3736"}],"wp:attachment":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media?parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/categories?post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/tags?post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}