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
import React from 'react' | |
type Props = { | |
message: string | |
} | |
const Child: React.FC<Props> = props => { | |
return ( | |
<p>{ props.message }</p> | |
) |
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
import React from 'react' | |
const App: React.FC = () => { | |
const message: string = "買い物リスト"; | |
type Item = { | |
id: number | |
title: string | |
} | |
const items: Item[] = [ | |
{ |
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
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import './App.css'; | |
// ステートのマッピング | |
function mappingState(state) { | |
return state; | |
} | |
// Appコンポーネント | |
class App extends Component { | |
constructor(props){ |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>React</title> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
</head> | |
<body> | |
<div class="main"> |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Reactサンプル</title> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script> | |
</head> | |
<body> |
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
import React from "react"; | |
class ContactForm extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
isSubmitted: false , | |
email: "", | |
hasEmailError: false , | |
content: "", |
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
<template> | |
<div> | |
<h1>axios</h1> | |
<ul v-for="(data ,key) in json_data" :key="data.id"> | |
<li>{{data.name}} ({{data.age}}) [{{key}}]</li> | |
</ul> | |
</div> | |
</template> | |
<script> |
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
<template> | |
<div> | |
<h1>axios</h1> | |
<ul v-for="(data, key) in json_data"> | |
<li>{{data.name}} ({{data.age}}) [{{key}}]</li> | |
</ul> | |
</div> | |
</template> | |
<script> |
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
<template> | |
<div> | |
<div> | |
<input type="text" v-model="folder_form" /> | |
<button type="button" @click="addFolder">フォルダを追加</button> | |
<div v-for="folder in folders"> | |
<button type="button" @click="currentFolder(folder.id)">選択</button> | |
<input type="text" v-model="folder.title" autocomplete="off"/> | |
<button type="button" @click="deleteFolder(folder.id)">削除</button> | |
<button type="button" @click="updateFolder(folder.id)">更新</button> |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use App\Task; | |
use Carbon\Carbon; | |
class TasksController extends Controller |