- RocheMusique
- FKJ
- Kartell
- Darius
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
Show hidden characters
| { | |
| "stage": 0, | |
| "env": { | |
| "development": { | |
| "plugins": ["react-transform"], | |
| "extra": { | |
| "react-transform": { | |
| "transforms": [{ | |
| "transform": "react-transform-hmr", | |
| "imports": ["react"], |
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
| const ADD_TO_CART = 'ADD_TO_CART'; | |
| const CHECKOUT_REQUEST = 'CHECKOUT_REQUEST'; | |
| export function addToCart(productId) { | |
| return { | |
| type: ADD_TO_CART, | |
| productId | |
| } | |
| } |
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 request from 'superagent'; | |
| const RECEIVE_PRODUCTS = 'RECEIVE_PRODUCTS'; | |
| export function getAllProducts() { | |
| return dispatch => { | |
| request.get('/products') | |
| .set('Content-Type', 'application/json') | |
| .end((err, res) => { | |
| if (err) { | |
| return new Error(err); |
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
| { | |
| "addPost" { children: ["completed", "failure"] } | |
| } | |
| // in your store | |
| onAddPost(), | |
| onAddPostCompleted(), | |
| onAddPostFailure() |
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
| render() { | |
| return ( | |
| <div> | |
| <button onClick={ this.updatePost }>Update</button> | |
| </div> | |
| ); | |
| }; | |
| updatePost(e) { |
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
| https://ohthehugemanatee.org/blog/2015/10/01/how-i-got-el-capitain-working-with-my-developer-tools/ |
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 { Component } from "React"; | |
| export var Enhance = (ComposedComponent, ajaxCall) => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| ajaxCall() | |
| .then(function(data) { | |
| this.setState({ data: data }); |
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 { Router } from 'react-router'; | |
| import { createStore } from 'redux'; | |
| import { Provider } from 'react-redux'; | |
| import App from '../shared/containers/App'; | |
| import todoApp from '../shared/reducers'; | |
| import routes from '../shared/routes'; | |
| import immutifyState from '../shared/lib/immutifyState'; | |
| const initialState = immutifyState(window.__INITIAL_STATE__); |