added redux
This commit is contained in:
parent
f71dda311a
commit
246b131b87
|
@ -0,0 +1,10 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { Component } from 'react';
|
||||||
|
|
||||||
|
export default class App extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div>Sample App</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import { createStore } from 'redux';
|
||||||
|
|
||||||
|
import App from './components/app';
|
||||||
|
|
||||||
|
ReactDOM.render(
|
||||||
|
<Provider store={createStore(() => {})}>
|
||||||
|
<App />
|
||||||
|
</Provider>
|
||||||
|
, document.getElementById('container'));
|
12
src/main.js
12
src/main.js
|
@ -1,12 +0,0 @@
|
||||||
import React, { Component } from 'react';
|
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
|
|
||||||
class Main extends Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>React Simple Starter</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReactDOM.render(<Main />, document.getElementById('container'));
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [
|
entry: [
|
||||||
'./src/main.js'
|
'./src/index.js'
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
path: __dirname,
|
path: __dirname,
|
||||||
|
|
Loading…
Reference in New Issue