Referências da semana de pré-work do Bootcamp em React.js
A semana de pré-work acontecerá nos dias 16/08/2021 à 20/08/2021 na Twitch do Daciuk.
Nessa semana, as lives acontecerão excepcionalmente à partir das 15h. Todas as informações sobre o Bootcamp você encontra em: https://b-academy.brainn.co/
This file contains 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
'use strict' | |
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
class LazyImg extends Component { | |
constructor () { | |
super() | |
this.state = { loaded: false } | |
this.img = {} |
This file contains 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
/* jslint browser: true, jquery: true, devel: true*/ | |
/* | |
Dependencies: Tumblr.Flags | |
Tumblr.Utils.exceptions will automatically log window.onerror. | |
DO NOT write code like this. This is written to handle weird cases | |
where normal code should probably just fail. | |
*/ |
This file contains 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
try { | |
const mensagem = JSON.parse(obj.mensagem) | |
console.log(mensagem) // {...} | |
} catch (e) { | |
console.log(obj.mensagem) // "Hello" | |
} |
This file contains 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
<?php | |
/* | |
Adicionar metabox à páginas específicas | |
*/ | |
function my_meta_setup_1() { | |
// criação da metabox | |
} | |
function especific_metabox_pages() { | |
$post_ID = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; |