aboutsummaryrefslogtreecommitdiff
path: root/src/client/react
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-10 00:22:36 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-10 00:22:36 +0100
commit503f94199f7fc730da4a1a1165c2863956d10000 (patch)
tree035e47f4a734a6c9b9649e77333ed49dce4ac710 /src/client/react
parentf18692872cdc28d29917247ef4f8ef7553a8b023 (diff)
Setup react-redux env
Diffstat (limited to 'src/client/react')
-rw-r--r--src/client/react/actions.js0
-rw-r--r--src/client/react/index.js14
-rw-r--r--src/client/react/reducers.js8
3 files changed, 22 insertions, 0 deletions
diff --git a/src/client/react/actions.js b/src/client/react/actions.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/client/react/actions.js
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(
+ <Provider store={store}>
+ <div>Hello World!</div>
+ </Provider>,
+ 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;