Skip to content

Commit

Permalink
Showing 4 changed files with 21 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
"react/prop-types": [0],
"indent": ["error", 4],
"react/jsx-indent": ["error", 4],
"comma-dangle": ["error", "only-multiline"]
"comma-dangle": ["error", "only-multiline"],
"react/prefer-stateless-function": "off"
}
}
8 changes: 6 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react';
import Header from './components/header';

const App = ({ title }) =>
<div>{title}</div>;
const App = () => (
<div>
<Header title="Mi Bodega" />
</div>
);

export default App;
12 changes: 12 additions & 0 deletions src/components/header/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { Component } from 'react';

export default class Header extends Component {
render() {
const { title } = this.props;
return (
<div>
{title}
</div>
);
}
}
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -2,10 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

const title = 'React with Webpack and Babel';

ReactDOM.render(
<App title={title} />,
<App />,
document.getElementById('app'), // eslint-disable-line no-undef
);

0 comments on commit 0a30fe3

Please sign in to comment.