- No permitir
input
ni ningun tipo de input interactivo
View index.md
View index
# 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 |
View test.md
var a = 2;
View index.js
function toClass(Component) { | |
return ClassWrapper extends React.Component { | |
render() { | |
return <Component {...this.props} /> | |
} | |
} | |
} |
View README.md
On React Native performance
This is the post-mortem report about the performance problems found mostly in Android but also, in a lesser extend in iOS.
__DEV__ = false
This has a huge impact in the performance. By my measures, about 4x times faster. So be sure to that the app is
View index.js
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 | |
View react-reusable-form.js
class Form extends React.Component { | |
constructor(props) { | |
this.state = { | |
name: '', | |
email: '' | |
} | |
} | |
handleNameChange(e) { | |
this.setState({ |
View index.md
Introduccion a React (español)
Introduccion
...
Nota es2015
Vamos a estar usando indiscriminadamente conceptos de es2015, si alguien no sabe algo me lo pregunta y lo discutimos
View index.js
const strmap = { | |
"diez": 10, | |
"nueve": 9, | |
"ocho": 8, | |
"siete": 7, | |
"seis": 6, | |
"cinco":5, | |
"cuatro": 4, | |
"tres": 3, |
View a.rs
use std::collections::{BTreeMap, BTreeSet}; | |
type State = String; | |
type DeltaValue = BTreeMap<char, BTreeSet<State>>; | |
type Delta = BTreeMap<State, DeltaValue>; | |
fn main() { | |
let mut delta: Delta = BTreeMap::new(); | |
let rules = [ | |
(("q0".to_string(), 'a'), "q1".to_string()), |
NewerOlder