Skip to content

Instantly share code, notes, and snippets.

View henriqueweiand's full-sized avatar

Henrique Weiand henriqueweiand

View GitHub Profile
const nav = (
<div className="sidebar">
<ul>
<li><a href="#">Início</a></li>
<li><a href="#">Sobre</a></li>
</ul>
</div>
)
{
"name": "pratica",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
{
"name": "pratica",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
},
devServer: {
contentBase: path.join(__dirname, 'public'),
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GoReact</title>
</head>
<body>
<div id="app"></div>
<script src="./bundle.js"></script>
import React from 'react';
import { render } from 'react-dom';
class App extends React.Component {
render() {
return (
<h1>
Hello React!!
</h1>
);
{
"name": "pratica",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --mode=development",
"build": "webpack --mode production"
},
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
},
devServer: {
contentBase: path.join(__dirname, 'public'),
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
{
"name": "pratica",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --mode=development",
"build": "webpack --mode production"
},