Skip to content

Commit

Permalink
Move core project files to /app for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Oct 22, 2017
1 parent 9b574ca commit d5a218f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -3,7 +3,7 @@ import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';

import thunk from "redux-thunk";

import rootReducer from "../reducers/rootReducer";
import rootReducer from "app/reducers/rootReducer";

export default function configureStore(preloadedState) {
const middlewares = [thunk];
Expand All @@ -21,8 +21,8 @@ export default function configureStore(preloadedState) {

if(process.env.NODE_ENV !== "production") {
if(module.hot) {
module.hot.accept("../reducers/rootReducer", () =>{
const newRootReducer = require("../reducers/rootReducer").default;
module.hot.accept("app/reducers/rootReducer", () =>{
const newRootReducer = require("app/reducers/rootReducer").default;
store.replaceReducer(newRootReducer)
});
}
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -4,7 +4,7 @@ import {Provider} from "react-redux";

import "semantic-ui-css/semantic.css";

import configureStore from "./store/configureStore";
import configureStore from "app/store/configureStore";
const store = configureStore();

// Save a reference to the root element for reuse
Expand All @@ -13,7 +13,7 @@ const rootEl = document.getElementById("root");
// Create a reusable render method that we can call more than once
let render = () => {
// Dynamically import our main App component, and render it
const App = require("./App").default;
const App = require("app/layout/App").default;

ReactDOM.render(
<Provider store={store}>
Expand All @@ -28,7 +28,7 @@ if(process.env.NODE_ENV !== "production") {
// Support hot reloading of components.
// Whenever the App component file or one of its dependencies
// is changed, re-import the updated component and re-render it
module.hot.accept("./App", () => {
module.hot.accept("app/layout/App", () => {
setTimeout(render);
});
}
Expand Down

0 comments on commit d5a218f

Please sign in to comment.