Skip to content

Commit

Permalink
remove or disable React 16 incompatible samples (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
didi0613 authored and jchip committed Jan 12, 2018
1 parent c66a09b commit e163751
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
6 changes: 1 addition & 5 deletions samples/universal-react-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,17 @@
"coverage": "clap check"
},
"dependencies": {
"above-the-fold-only-server-render": "^1.0.2",
"bluebird": "^3.4.6",
"electrode-archetype-react-app": "../../packages/electrode-archetype-react-app",
"electrode-csrf-jwt": "^1.0.0",
"electrode-react-ssr-caching": "^0.1.3",
"electrode-react-webapp": "../../packages/electrode-react-webapp",
"electrode-redux-router-engine": "../../packages/electrode-redux-router-engine",
"electrode-server": "^1.0.0",
"electrode-static-paths": "^1.0.0",
"es6-promise": "^4.0.5",
"isomorphic-fetch": "^2.2.1",
"mongojs": "^2.4.0",
"react": "^15.0.0",
"react-dom": "^15.0.0",
"react-notify-toast": "^0.1.3",
"react-notify-toast": "^0.4.0",
"uuid": "^3.0.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions samples/universal-react-node/src/client/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Home from "./components/home";
import SSRCachingTemplateType from "./components/ssr-caching-template-type";
import SSRCachingSimpleType from "./components/ssr-caching-simple-type";
import { CSRF } from "./components/csrf";
import AboveFold from "./components/above-the-fold";
// import AboveFold from "./components/above-the-fold";
import PushNotifications from "./components/push-notifications";
import TodoApp from "./components/todo-app";
import RecordStore from "./components/record-store";
Expand All @@ -15,7 +15,7 @@ export const routes = (
<Route path="ssrcachingtemplatetype" component={SSRCachingTemplateType} />
<Route path="ssrcachingsimpletype" component={SSRCachingSimpleType} />
<Route path="csrf" component={CSRF} />
<Route path="above-the-fold" component={AboveFold} />
{/* <Route path="above-the-fold" component={AboveFold} /> */}
<Route path="push-notifications" component={PushNotifications} />
<Route path="todo-app" component={TodoApp} />
<Route path="record-store" component={RecordStore} />
Expand Down
16 changes: 0 additions & 16 deletions samples/universal-react-node/src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,17 @@ process.on("SIGINT", () => {
process.exit(0);
});

const SSRCaching = require("electrode-react-ssr-caching");
const support = require("electrode-archetype-react-app/support");
const electrodeConfippet = require("electrode-confippet");
const electrodeServer = require("electrode-server");
const staticPathsDecor = require("electrode-static-paths");

const cacheConfig = {
components: {
SSRCachingTemplateType: {
strategy: "template",
enable: true
},
SSRCachingSimpleType: {
strategy: "simple",
enable: true
}
}
};

require.extensions[".css"] = () => {
return;
};

support.load({
cssModuleHook: true
}).then(() => {
SSRCaching.enableCaching();
SSRCaching.setCachingConfig(cacheConfig);
return electrodeServer(electrodeConfippet.config, [staticPathsDecor()]);
});

0 comments on commit e163751

Please sign in to comment.