====Nginx インストール===================================
$ sudo yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
$ sudo vi /etc/yum.repos.d/nginx.repo
以下を記述する
| import { useReducer } from 'react' | |
| // reducerが受け取るactionの型を定義します | |
| type Action = 'DECREMENT' | 'INCREMENT' | 'DOUBLE' | 'RESET' | |
| // 現在の状態とactionにもとづいて次の状態を返します | |
| const reducer = (currentCount: number, action: Action) => { | |
| switch (action) { | |
| case 'INCREMENT': | |
| return currentCount + 1 |
| //React.ReactNodeの指定 | |
| // Containerのpropsの型を定義します | |
| type ContainerProps = { | |
| title: string | |
| children: React.ReactNode | |
| } | |
| // Reactコンポーネントの型付けに関しては、以下もご参照ください | |
| // https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components/ |
====Nginx インストール===================================
$ sudo yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
$ sudo vi /etc/yum.repos.d/nginx.repo
以下を記述する
| <canvas id="myChart" width="400" height="400"></canvas> |
| <canvas id="myChart" width="400" height="400"></canvas> |