I hereby claim:
- I am kocisov on github.
- I am koci (https://keybase.io/koci) on keybase.
- I have a public key ASBXHD4BBI1gweZOkEPh2gPUVO0fvd9JkFJGrVmeYCcWlgo
To claim this, I am signing this object:
// example | |
// don't overthink this too much | |
class X extends PureComponent { | |
// constructor equivalent for creating initial state | |
state = { | |
something: '' | |
} | |
// function that returns another function | |
changeReturn = () => e => { |
function flookThis (input) { | |
console.log(input) | |
} |
export default 'http://play.typeracer.com/?rt=i5gfna57v' |
// require your modules | |
var express = require('express') | |
var bodyParser = require('body-parser') | |
// create instance of express | |
var app = express() | |
// let app use body-parser | |
// this one is parsing application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })) |
import * as React from 'react' | |
import { render } from 'react-dom' | |
import { PieChart, Pie, Cell } from 'recharts' | |
const data = [ | |
{ | |
name: 'Low thing', | |
value: 3, | |
color: '#d0d0d0', | |
}, |
function download(filename, text) { | |
// create link element | |
const element = document.createElement('a') | |
// set link href to our text | |
element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(text)}`) | |
// set attribute download | |
element.setAttribute('download', filename) | |
I hereby claim:
To claim this, I am signing this object:
import * as React from 'react' | |
class Button extends React.PureComponent { | |
render() { | |
return ( | |
<button onClick={this.props.onClick}>{this.props.text}</button> | |
} | |
} | |
} |
class App extends Component { | |
// return false = COMPONENT_SHOULD_NOT_UPDATE! | |
// return true = COMPONENT_SHOULD_UPDATE! | |
shouldComponentUpdate(nextProps, nextState) { | |
// PureComponent do this for you, not for everything tho | |
return this.props.value != nextProps.value; | |
} | |
render() { | |
return ( |
To switch files/extensions/debugger... press CMD+Shift+[E|X|D|...]
https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css