Skip to content

Instantly share code, notes, and snippets.

Avatar

Yosuke Saito saitoxu

View GitHub Profile
View html5-conf-memo.md

2016/09/03に参加したHTML5 Conferenceのメモ。

基調講演含め6つのセッションを聞いた。

適当に要約しているため実際の内容と変わっているかもしれないがあしからず(あと敬称略)。

基調講演

WEBという名前の大規模分散オペレーティング・システム

View test.py
class Test(object):
def __init__(self):
print('hoge hoge hoge hoge hoge hoge hoge hoge hoge hoge hoge hoge')
@saitoxu
saitoxu / Board.js
Last active Mar 21, 2017
2017-03-21
View Board.js
import React, { Component } from 'react';
import Square from './Square';
class Board extends Component {
renderSquare(i) {
return <Square value={this.props.squares[i]} onClick={() => this.props.onClick(i)} />;
}
render() {
return (
View Board.js
import React, { Component, PropTypes } from 'react';
import Knight from './Knight';
import BoardSquare from './BoardSquare';
import { canMoveKnight, moveKnight } from './Game';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
class Board extends Component {
renderSquare(i) {
const x = i % 8;
View application.js
import Friend from './friend';
let friend = new Friend('Taro');
friend.callName();
@saitoxu
saitoxu / Board.js
Last active Mar 26, 2017
2017-03-26
View Board.js
import React, { Component } from 'react';
import Square from './Square';
class Board extends Component {
renderSquare(i) {
return <Square key={i}
value={this.props.squares[i].value}
onClick={() => this.props.onClick(i)}
highlighted={this.props.squares[i].highlighted} />;
}
@saitoxu
saitoxu / App.js
Last active Mar 30, 2017
2017-03-30
View App.js
import React, { Component } from 'react';
import Form from './Form';
import TodoList from './TodoList';
export default class App extends Component {
constructor() {
super();
this.state = {
todos: []
};
@saitoxu
saitoxu / App.js
Last active Apr 2, 2017
2017-04-02
View App.js
import React, { Component } from 'react'
import { Link, Route, Switch } from 'react-router-dom'
import Form from './Form'
import Todo from './Todo'
import TodoList from './TodoList'
const Top = () => (
<div>Top</div>
)
@saitoxu
saitoxu / Frame.js
Last active Apr 5, 2017
2017-04-05
View Frame.js
import React, { Component } from 'react'
export default class Frame extends Component {
componentDidMount() {
const appearin = this.props.appearIn
const roomName = this.props.match.params.roomName
appearin.addRoomToElementById("appearin-frame", roomName)
}
render() {
View AsyncApp.js
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { fetchReposIfNeeded } from '../actions'
import Form from '../components/Form'
import Repos from '../components/Repos'
class AsyncApp extends Component {
constructor(props) {
super(props)
this.handleSubmit = this.handleSubmit.bind(this)