A collection of links to the "Master the JavaScript Interview" series of medium stories by Eric Elliott.
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 gql from 'graphql-tag' | |
| const PokeInfo = gql` | |
| fragment BasicPokeInfo on pokemon { | |
| name | |
| image | |
| number | |
| } | |
| ` |
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"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Exercício</title> | |
| <style> | |
| .clicked { | |
| background: darkgray; |
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 CardMedia from '@material-ui/core/CardMedia' | |
| const styles = { | |
| media: { | |
| height: 140 | |
| } | |
| }; | |
| const Image = ({ image, name }) => ( |
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' | |
| const Films = ({ films }) => ( | |
| <div className="card-row"> | |
| <span className="card-label">Films: </span> | |
| {films.length > 0 && | |
| films.map(film => ( | |
| <span key={film.episode_id} className="planet-films"> | |
| {films.length === 1 ? `${film.title}` : `${film.title}, `} | |
| </span> |
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, { Fragment } from 'react' | |
| import { Name, Image } from '../../atoms' | |
| const Evolution = ({ evolutions }) => ( | |
| <Fragment> | |
| {evolutions.map((evolutions, index) => ( | |
| <Fragment> | |
| <Name key={index} name={evolutions.name} /> | |
| <Image key={evolutions.id} image={evolutions.image} name={evolutions.name} /> | |
| </Fragment> |
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, { useState } from 'react' | |
| import PokeResult from '../../components/organisms' | |
| export default function Pokedex() { | |
| const [searchInput, setSearchInput] = useState('') | |
| const [search, clickSearch] = useState('') | |
| return ( | |
| <div style={{ display: 'flex', justifyContent: 'center', flexDirection: 'column', alignItems: 'center' }}> | |
| <h2>Pokedex</h2> |
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
| (function (DOM) { | |
| 'use strict' | |
| /* | |
| No HTML: | |
| - Crie um formulário com um input de texto que receberá um CEP e um botão | |
| de submit; | |
| - Crie uma estrutura HTML para receber informações de endereço: | |
| "Logradouro, Bairro, Estado, Cidade e CEP." Essas informações serão | |
| preenchidas com os dados da requisição feita no JS. | |
| - Crie uma área que receberá mensagens com o status da requisição: |
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
| <link rel="stylesheet" href="./style.css"> | |
| <table style="width:100%" class="q_sel_simp"> | |
| <tbody> | |
| <tr> | |
| <td class=" sel_simp linha_impar coluna_impar" style="width:9%;text-align:center;vertical-align:baseline"> | |
| <div onclick="clicar_texto('opc674241_1')">0</div> | |
| </td> | |
| <td class=" sel_simp linha_impar coluna_par" style="width:9%;text-align:center;vertical-align:baseline"> | |
| <div onclick="clicar_texto('opc674241_2')">1</div> |
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, { Fragment } from 'react' | |
| const renderAbilities = (abilities) => { | |
| const isValidAbility = (ability) => Boolean(ability.ability) | |
| const abilityElement = ({ ability: { name } }, index) => <li key={index}>{name}</li> | |
| return abilities.map((ability, index) => | |
| isValidAbility(ability) ? abilityElement(ability, index) : null | |
| ) | |
| } |
NewerOlder