Title / Description
Code render: function(){ var chicken = this //means to whatever var filter = items.filter(function(item){ return ((item.category === chicken.props.category) && item.name.indexOf(chicken.props.query) !== -1) //means when evaluating eg <DataRow category={"Electronics"}/> above, this.props.category is Electronics //have to use chicken instead of this because this would refer to what called it, ie var filter function. })
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code