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
/** EXTENSION **/ | |
.ui-slider label { | |
display: block; | |
position: absolute; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin-top: 20px; | |
text-align: center; | |
padding: 5px 15px; | |
} |
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
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); | |
var browserify = require('browserify'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var uglify = require('gulp-uglify'); | |
var buffer = require('vinyl-buffer'); | |
var babelify = require('babelify'); | |
gulp.task('build', function () { | |
return browserify({entries: './src/client/app.js', extensions: ['.js'], debug: true}) |
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'; | |
import ReactDOM from 'react-dom'; | |
class Application extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
itemList: [{name: 'Apple', type: 'Fruit'}, {name: 'Beef', type: 'Meat'}] | |
} | |
} |
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'; | |
import GroceryList from './GroceryList.react'; | |
import ItemAdder from './ItemAdder.react'; | |
class Application extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
itemList: [{name: 'Apple', type: 'Fruit'}, {name: 'Beef', type: 'Meat'}] |
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> | |
<head> | |
<meta charset="utf-8" /> | |
<title>React Tutorial</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.css"> | |
</head> | |
<body> | |
<div id="react-app"></div> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></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
var fs = require('fs'); | |
var traverseFileSystem = function (currentPath) { | |
var files = fs.readdirSync(currentPath); | |
for (var i in files) { | |
var currentFile = currentPath + '/' + files[i]; | |
var stats = fs.statSync(currentFile); | |
if (stats.isFile()) { | |
var path = currentFile.split('/'); | |
var newName = path.pop().replace(/-/g, '_'); |
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'; | |
export default function Wrapper () { | |
return WrappedComponent => class extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { data: null }; //exemple | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); //exemple |
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
/** @packages importation */ | |
import React from 'react'; | |
import { connect } from 'react-redux'; | |
/** actions importation */ | |
import { changeListArray, itemSubmit, itemIncreasing, itemNameChange } from '../actions/grocery-list-actions'; | |
/** Item de base pour le store */ | |
import baseItemsList from '../utils/baseList'; |
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'; | |
import { connect } from 'react-redux'; | |
import GroceryList from './GroceryList.react'; | |
import ItemAdder from './ItemAdder.react'; | |
import { changeListArray, itemSubmit, itemIncreasing, itemNameChange } from '../actions/grocery-list-actions'; | |
import baseItemsList from '../utils/baseList'; | |
class Application extends React.Component { |
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'; | |
import { Link } from 'react-router'; | |
class Application extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return ( |