I hereby claim:
- I am franleplant on github.
- I am flpremind (https://keybase.io/flpremind) on keybase.
- I have a public key ASBE5mY-xGiOFD2B31ss8_TT94sUXjuctEAJ4XJsYHVlgAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Week04.Homework where | |
| import Data.Aeson (FromJSON, ToJSON) |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE TypeFamilies #-} |
input ni ningun tipo de input interactivo| # Control: Google | |
| wrk -t12 -c400 -d30s http://google.com | |
| Running 30s test @ http://google.com | |
| 12 threads and 400 connections | |
| Thread Stats Avg Stdev Max +/- Stdev | |
| Latency 519.53ms 204.18ms 2.00s 92.92% | |
| Req/Sec 45.19 25.95 181.00 73.51% | |
| 14840 requests in 30.10s, 6.77MB read |
var a = 2;| function toClass(Component) { | |
| return ClassWrapper extends React.Component { | |
| render() { | |
| return <Component {...this.props} /> | |
| } | |
| } | |
| } |
| class MyComp extends React.Component { | |
| render() { | |
| // copy props shallowly, you can use other technics such as lodash cloneDeep, et al | |
| // Why do this? because props are inmutable | |
| let props = Object.assign({}, this.props); | |
| delete props.unwantedProp1 | |
| ... | |
| delete props.unwantedPropN | |
| // You can also achieve all this with lodash.omit | |
| class Form extends React.Component { | |
| constructor(props) { | |
| this.state = { | |
| name: '', | |
| email: '' | |
| } | |
| } | |
| handleNameChange(e) { | |
| this.setState({ |