Skip to content

Commit

Permalink
Move app to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnav committed Jun 21, 2017
1 parent 93fd6a7 commit a2807f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 10 additions & 0 deletions src/components/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';

export default function app() {
return (
<div>
<h1>JSX</h1>
<span>My first JSX span!</span>
</div>
);
}
10 changes: 2 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app';

const container = document.getElementById('container');
const app = (
<div>
<h1>JSX</h1>
<span>My first JSX span!</span>
</div>
);

ReactDOM.render(app, container);
ReactDOM.render(<App></App>, container);

0 comments on commit a2807f2

Please sign in to comment.