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 useModalState from './useModalState'; | |
import Modal from './Modal'; // import your modal component here | |
const Component = () => { | |
const { isOpen, onOpen } = useModalState(); // import the state controller and the triggers you might need | |
const handleCTAClick = () => { | |
onOpen(); | |
}; |
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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
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
//This gist is a fast reference to ES06 to whose already knows es05. | |
//I'm trying to use a different approach: first the example and after the explanation. | |
//Lesson 1: Template literals | |
console.log(`hello ${firstname}, | |
how are you?`); | |
//Template literals are string literals with support for interpolation(using ${variable}) and multiple lines. |
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
<html> | |
<head> | |
<title>Treino de Hoje</title> | |
<link type="text/css" rel="stylesheet" href="style.css"> | |
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Anton" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet"> | |
</head> | |
<body> |