From 503f94199f7fc730da4a1a1165c2863956d10000 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sun, 10 Dec 2017 00:22:36 +0100 Subject: Setup react-redux env --- src/client/react/actions.js | 0 src/client/react/index.js | 14 ++++++++++++++ src/client/react/reducers.js | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/client/react/actions.js create mode 100644 src/client/react/index.js create mode 100644 src/client/react/reducers.js (limited to 'src/client/react') diff --git a/src/client/react/actions.js b/src/client/react/actions.js new file mode 100644 index 0000000..e69de29 diff --git a/src/client/react/index.js b/src/client/react/index.js new file mode 100644 index 0000000..7e5f559 --- /dev/null +++ b/src/client/react/index.js @@ -0,0 +1,14 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Provider } from 'react-redux'; +import { createStore } from 'redux'; +import reducer from './reducers'; + +const store = createStore(reducer); + +ReactDOM.render( + +
Hello World!
+
, + document.getElementById('root'), +); diff --git a/src/client/react/reducers.js b/src/client/react/reducers.js new file mode 100644 index 0000000..1afcec5 --- /dev/null +++ b/src/client/react/reducers.js @@ -0,0 +1,8 @@ +const reducer = (state = [], action) => { + switch (action.type) { + default: + return state; + } +}; + +export default reducer; -- cgit v1.1