- Create index.html
- Create index.js
npm i -D parcel- Create .babelrc
- Add
parcel index.htmlto scripts npm start
Last active
November 22, 2018 08:30
-
-
Save vnys/7f425a8417c54db9a15482d7b1558eb7 to your computer and use it in GitHub Desktop.
React and Parcel simplest setup possible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| "@babel/preset-react" | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script src="index.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react" | |
| import ReactDOM from "react-dom" | |
| const App = () => <div>You’re the only one, Joe!</div> | |
| const mountNode = document.getElementById("app") | |
| ReactDOM.render(<App />, mountNode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment