This file contains 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'; | |
class App extends Component { | |
handleClick = () => { | |
import ('./moduleA') | |
.then(({ | |
moduleA | |
}) => { | |
// Use moduleA | |
}) |
This file contains 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 { ajax } from 'rxjs/observable/dom/ajax'; | |
import 'rxjs/add/operator/catch' | |
import { | |
REQUEST_USER_REPOS_START | |
} from '../actions/actionTypes'; | |
import { | |
doUserReposFulfilled, | |
doUserReposFailed | |
} from '../actions/doUserRepos'; |
This file contains 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
// File- src/home/containers/UserRepos.js | |
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux' | |
// Import dumb component | |
import Repo from '../components/Repo'; | |
// Actions | |
import { doUserRepos } from '../actions/doUserRepos'; |
This file contains 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
// src/index.js | |
import createHistory from 'history/createBrowserHistory' | |
import { ConnectedRouter, routerReducer } from 'react-router-redux' | |
import { Route } from 'react-router' | |
import { Provider } from 'react-redux' | |
// Other imports ... | |
// Add the reducer to your store on the `router` key | |
// Also apply our middleware for navigating |
This file contains 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 { | |
ajax | |
} from 'rxjs/observable/dom/ajax'; | |
import 'rxjs/add/operator/catch' | |
import 'rxjs/add/operator/debounceTime' | |
import queryString from 'query-string' | |
import { | |
Observable | |
} from 'rxjs/Observable'; |
This file contains 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
// File - src/index.js | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import registerServiceWorker from './registerServiceWorker'; | |
import { Provider } from 'react-redux'; | |
import { ConnectedRouter } from 'react-router-redux'; | |
// Import store and history | |
import store, { history } from './store'; |
This file contains 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 { | |
combineEpics | |
} from 'redux-observable'; | |
// Import feature wise epic | |
import common from './common/epics'; | |
import catalog from './catalog/epics'; | |
import home from './home/epics'; | |
import archives from './archives/epics'; |
This file contains 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 { combineReducers } from 'redux'; | |
import { routerReducer } from 'react-router-redux'; | |
import { | |
reducer as toastrReducer | |
} from 'react-redux-toastr' | |
import common from './common/reducers'; | |
import catalog from './catalog/reducers'; | |
import home from './home/reducers'; | |
import product from './product/reducers'; |
This file contains 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, applyMiddleware } from 'redux'; | |
import { createEpicMiddleware } from 'redux-observable'; | |
import createHistory from 'history/createHashHistory'; | |
import { routerMiddleware } from 'react-router-redux'; | |
// import root epic/reducer | |
import rootEpic from './rootEpic'; | |
import rootReducer from './rootReducer'; | |
import queryString from 'query-string'; |
This file contains 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
/*! Namespaced Bootstrap 3.3.7 | |
* Load Glyphicons Halflings extrnally | |
* Bootstrap v3.3.7 (http://getbootstrap.com) | |
* Copyright 2011-2016 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | |
/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ | |
html { | |
font-family: sans-serif; |