Skip to content

Commit 000d2ba

Browse files
Merge branch 'master' of github.com:CS-Eevee/react-proto
2 parents 24a9fb3 + 9a147cd commit 000d2ba

File tree

9 files changed

+57
-4
lines changed

9 files changed

+57
-4
lines changed

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
"electron": "^2.0.5",
2020
"react": "^16.2.0",
2121
"react-dom": "^16.2.0",
22-
"react-rnd": "^8.0.2"
22+
"react-redux": "^5.0.7",
23+
"react-rnd": "^8.0.2",
24+
"redux": "^4.0.0",
25+
"redux-devtools-extension": "^2.13.5",
26+
"redux-thunk": "^2.3.0"
2327
},
2428
"devDependencies": {
2529
"babel-core": "^6.26.0",

src/actionTypes/actionTypes.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// exportconst ADD_COMPONENT = 'ADD_COMPONENT';

src/actions/components.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import * as types from '../constants/actionTypes.js';

src/components/App.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from 'react';
22
// import Rnd from 'react-rnd';
3-
import '../style.css';
3+
import Paper from '@material-ui/core/Paper';
4+
import Grid from '@material-ui/core/Grid';
45

56
class App extends Component {
67
render() {
@@ -12,7 +13,18 @@ class App extends Component {
1213
// };
1314
return (
1415
<div>
15-
<h1>My react app</h1>
16+
<Grid container spacing={0}>
17+
<Grid item xs={3}>
18+
<Paper>xs=3</Paper>
19+
</Grid>
20+
<Grid item xs={6}>
21+
<Paper>asdfas=6</Paper>
22+
</Grid>
23+
<Grid item xs={3}>
24+
<Paper>f=3</Paper>
25+
</Grid>
26+
</Grid>
27+
<h1>My react grapple</h1>
1628
</div>
1729
);
1830
}

src/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import App from './components/App';
4+
import { Provider } from 'react-redux';
5+
import store from './store';
46
import './style.css';
57

6-
ReactDOM.render(<App />, document.getElementById('app'));
8+
ReactDOM.render(
9+
<Provider store={store}>
10+
<App />
11+
</Provider>,
12+
document.getElementById('app'));

src/public/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title>React Proto</title>
9+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
911
</head>
1012

1113
<body>

src/reducers/componentReducer.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as types from '../constants/actionTypes';
2+
3+
export default (state = [], action) => {
4+
let componets;
5+
6+
switch(action.type) {
7+
default:
8+
return state;
9+
}
10+
};

src/reducers/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { combineReducers } from 'redux';
2+
3+
import componentReducer from './componentReducer.js';
4+
5+
const reducers = combineReducers({
6+
components: componentReducer
7+
})
8+
9+
export default reducers;

src/store.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { createStore, applyMiddleware } from 'redux';
2+
import { composeWithDevTools } from 'redux-devtools-extension';
3+
4+
const store = createStore(
5+
reducers,
6+
)
7+
8+
export default store;

0 commit comments

Comments
 (0)