-
コンポーネント
-
Props 親 コンポーネントの属性。つまり、コンポーネントのinterface、React.propTypesで宣言的に記述する。immutable
-
State 自身 コンポーネントの状態。たくさんのstateを持つ場合は、複雑とも言える。mutable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File Location /etc/systemd/system/SpringbootService.service | |
| [Unit] | |
| Description=SpringbootService | |
| [Service] | |
| Type=simple | |
| WorkingDirectory=/www/api | |
| ExecStart=/www/api/exec.sh outside | |
| ExecStop=/bin/kill -s QUIT $MAINPID | |
| Restart=on-failure | |
| User=root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # curl -o /etc/nginx/conf.d/jenkins.conf https://gist.githubusercontent.com/1206yaya/3b953e7d6df431f306c3255ca43161ef/raw/9053808d295db944f5d102416ad0fe64abc8a90a/gistfile1.txt | |
| upstream jenkins { | |
| server 127.0.0.1:8080; | |
| } | |
| server { | |
| listen 80 default; | |
| server_name sample.jenkins; | |
| access_log /var/log/nginx/access.log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Copyright 2011 the Dart project authors. All rights reserved. | |
| Use of this source code is governed by a BSD-style license | |
| that can be found in the LICENSE file. --> | |
| <h2>Dr. Fibonacci's Sunflower Spectacular</h2> | |
| <div> | |
| <canvas id="canvas" width="300" height="300"></canvas> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM jenkins/jenkins:lts | |
| # Install plugins | |
| COPY ./plugins.txt /usr/share/jenkins/ref/plugins.txt | |
| RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt | |
| USER root | |
| RUN apt-get update | |
| ##### Docker install START >>> | |
| # 前提ソフトウェアのインストール |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2020-11-17T03:54:22.356Z","extensionVersion":"v3.4.3"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
サンプルコード sample-react-redux-jest
stateとactionを用意して、更新後のstateが期待したものになっているかを検証する
src/reducers/counter.js
const defaultState = {
count: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const [inputState, setInputState] = useState({ title: '', amount: '' }); | |
| ... | |
| return ( | |
| ... | |
| <input | |
| value={inputState.title} | |
| onChange={event => { | |
| const newTitle = event.target.value; | |
| // setInputStateにはObjectを渡す |