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
| <ReactCSSTransitionGroup | |
| component="div" | |
| className="app-wrapper" | |
| transitionName="app-transition" | |
| transitionEnterTimeout={2000} | |
| transitionAppear={true} | |
| transitionAppearTimeout={2000} | |
| transitionLeaveTimeout={2000}> | |
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
| export function someOtherAction(data) { | |
| ... | |
| } | |
| export function thunk(url) { | |
| return function(dispatch, getState) { | |
| return axios.get(url).then(data => { | |
| dispatch(someOtherAction(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
| export function reduxThunk(data) { | |
| return function(dispatch, getState) { | |
| // Gather all the requests into an array | |
| const fileArr = []; | |
| fileRequests.map((file, i) => { | |
| return fileArr.push(axios.get(file.raw_url)); | |
| }); |
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 { createStore } from 'redux'; | |
| import reducers from './reducers/index'; | |
| // Includes Redux devtools | |
| const store = createStore(reducers, window.devToolsExtension && window.devToolsExtension()); | |
| export default store; |
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'; | |
| export default class MyComponent extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| component | |
| </div> | |
| ); | |
| } |