feat(news): Initial app with webpack

This commit is contained in:
Stuart Taylor
2018-07-31 16:33:56 +01:00
committed by mrugesh mohapatra
parent 42a97da763
commit c84a9c8b57
7 changed files with 315 additions and 25 deletions

14
news/NewsApp.js Normal file
View File

@@ -0,0 +1,14 @@
import React from 'react';
const propTypes = {};
function NewsApp() {
return (
<h1>This is the news!</h1>
);
}
NewsApp.displayName = 'NewsApp';
NewsApp.propTypes = propTypes;
export default NewsApp;

12
news/index.js Normal file
View File

@@ -0,0 +1,12 @@
import React from 'react';
import { render } from 'react-dom';
import NewsApp from './NewsApp';
const newsMountPoint = document.getElementById('news-app-mount');
render(
<NewsApp/>,
newsMountPoint,
() => console.log('react has rendered and is ready to go go go go go go!!')
);