Skip to content

Instantly share code, notes, and snippets.

@bbandydd
Last active May 3, 2018 04:01
Show Gist options
  • Select an option

  • Save bbandydd/47517f421e08789f7a22aeb0aac6882f to your computer and use it in GitHub Desktop.

Select an option

Save bbandydd/47517f421e08789f7a22aeb0aac6882f to your computer and use it in GitHub Desktop.
Parcel React
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="./index.js"></script>
</body>
</html>
import React from 'react';
import { render } from 'react-dom';
render(
<div>Hello React</div>,
document.getElementById('app')
);
"scripts": {
"start": "parcel -p 8080 index.html",
"build": "rm -rf ./dist && parcel build index.html"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment