Posts

Showing posts from June, 2015

React - Ajax Requests

//English Hi Guys, today I'm going to expose hot to make Ajax requests with React, It's pretty straight forward...(At the end you will see the link to my plunker, to see it working...) Basically you just create your Class: var ReactAjax = React.createClass({ getInitialState : function(){ return { plunks : [] } }, render : function(){ var plunks = this.state.plunks; return ( <div id="container"> <div className="row"> <div className="col-xs-4 col-xs-offset-4"> <button onClick={this.fetchPlunks} className="btn btn-default">Get My(brion25) Plunks</button> </div> </div> <PlunksList plunks={plunks} /> </div> ); } }); And on the event, it could be either a click, change, etc. you just make the requests: fetchPlunks : function(){ var self = this; jQuery.ajax({

JSPERF POST - Angular.extend vs this vs $scope

//English Hi guys, let's see what is better, Angular.extend or the use of this? Go to jsperf to see the results ... //Spanish Hola chavos, ahora veamos que es mejor, Angular.extend o el use del this? Vayan a jsperf para ver los resultados ...

JSPERF POST - Angular.extend vs jQuery.extend vs lodash.extend

//English Hi guys, now let's talk about performance: Who will win? Angular, lodash or jQuery? Go to jsperf to see the results , I think you will be amazed... //Spanish Hola chavos, hablemos de rendimiento, quien ganara? Angular, lodash o jQuery? vayan a jsperf y vean los resultados , creo que se van a sorprender...