Skip to content

Instantly share code, notes, and snippets.

View takahiro-saeki's full-sized avatar
🏠
Working from home

hiro takahiro-saeki

🏠
Working from home
View GitHub Profile
import React, { Component } from 'react';
export default class SampleClass extends Component {
constructor(props) {
super(props)
}
componentDidMount() {
//this is action, and you need to set up bindActionCreators if you wanna use action directory.
this.props.fetchDogApi()
render() {
const maxWidth = '1024px';
const transition = '.5s';
return (
<div>
<Style>
{
`
body {
margin: 0;
body {
margin: 0;
}
.nav-item {
padding: 1rem;
background: #CCC;
color: #222;
}
...
"webpack": "^2.1.0-beta.28",
"webpack-dev-server": "^2.1.0-beta.0"
...
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
entry: [
'./index.js',
'./ejs/index.ejs',
'./ejs/detail.ejs'
],
import React, {Component} from 'react';
import classNames from 'classnames';
import Image1 from '../../img/book1.png';
import Image2 from '../../img/book2.png';
import Image3 from '../../img/book3.png';
import Media1 from '../../img/media1.png';
import Media2 from '../../img/media2.png';
import github1 from '../../img/github1.png';
import github2 from '../../img/github2.png';
import github3 from '../../img/github3.png';
@takahiro-saeki
takahiro-saeki / test.js
Created September 18, 2016 23:05
The code to be used in the medium
class Test {
constructor(options) {
this.options = Object.assign({
elem: '#app',
time: 1000,
animate: 'normal'
}, options)
...
}
...
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Redirect http://www. to just http://
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]