Entendendo a sintaxe básica da linguagem em Y minutos: https://learnxinyminutes.com/docs/javascript/
Aprendendo a sintaxe da versão mais recente da linguagem https://egghead.io/courses/learn-es6-ecmascript-2015
Entendendo a sintaxe básica da linguagem em Y minutos: https://learnxinyminutes.com/docs/javascript/
Aprendendo a sintaxe da versão mais recente da linguagem https://egghead.io/courses/learn-es6-ecmascript-2015
import { AppContainer } from 'react-hot-loader' // Install `npm install react-hot-loader@next` | |
import React from 'react' | |
import App from './App' | |
const renderApp = (Root) => { | |
React.render( | |
<AppContainer> | |
<Root /> | |
</AppContainer>, | |
document.getElementById('app-root') |
{ | |
"React Component": { | |
"prefix": "reactComp", | |
"body": [ | |
"import React, { Component } from 'react'", | |
"import PropTypes from 'prop-types'", | |
"", | |
"class ${1:${TM_FILENAME/(.*)\\.js/${1:/capitalize}/}} extends Component {", | |
" render() {", | |
" return (", |
(function () { | |
var video = document.querySelector('video:not([title="Advertisement"])') | |
if (!video.webkitSupportsPresentationMode || typeof video.webkitSetPresentationMode !== 'function') { | |
console.error('Esse código só funciona no Safari!') | |
return | |
} | |
var scoreX = document.querySelector('.placar__equipes') | |
var button = document.createElement('button') |
<react component="vtex.Hello" props=something.insideAngularScope"></react> |
<div className="w-100 absolute bottom-0" | |
style={{ | |
background: 'linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)', | |
maxHeight: '50px', | |
height: '100%', | |
pointerEvents: 'none', | |
}}> |
const searchEncodeURI = (str) => { | |
return str.replace(/[%"'.()]/g, (c) => { | |
switch (c) { | |
case '%': | |
return "@perc@" | |
case '"': | |
return "@quo@" | |
case '\'': | |
return "@squo@" | |
case '.': |
{ | |
"React Function Component": { | |
"description": "Write basic React component", | |
"prefix": "reactFunc", | |
"body": [ | |
"import React from 'react'", | |
"import 'twin.macro'", | |
"", | |
"type ${1:${TM_FILENAME_BASE}}Props = {", | |
" $2", |
export function convertPxToCm(pixels: number) { | |
return (pixels * 2.54) / (96 * window.devicePixelRatio) | |
} | |
export function convertCmToPx(cm: number) { | |
return (cm * 96) / 2.54 | |
} |