Skip to content

ZeAlmeida93/ex-hello-world

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercicio - Hello World

Replica a seguinte estrutura utilizando os metodos de React & ReactDOM (createElement, createRoot) em javascript para que seja representada na página:

<div class="main-container">
    <h2 class="titulo">Hello Edit!</h2>
    <div class="cubo"></div>
    <div class="cubo"></div>
    <div class="cubo"></div>
    <div class="cubo"></div>
    <div class="cubo"></div>
    <div class="cubo"></div>
</div>

Exemplo de criação:

const button = React.createElement(
	"button",
	{
		class: "btn",
	},
	"Click this Button"
);

const elemento = React.createElement(
	"h1",
	{
		id: "cenas",
		title: "Cenas maradas",
	},
	"Conteudo do H1"
);

const div = React.createElement("div", null, elemento, button);

ReactDOM.createRoot(document.getElementById("root")).render(div);

About

Ex 1: Hello World

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 54.6%
  • JavaScript 33.6%
  • HTML 11.8%