Skip to content

Instantly share code, notes, and snippets.

View crisecheverria's full-sized avatar

Cristian Echeverria crisecheverria

View GitHub Profile
@markerikson
markerikson / connectExample.js
Last active March 5, 2024 01:24
React-Redux connect example
import {action1, action2} from "myActions";
import {bindActionCreators} from "redux";
import {connect} from "react-redux";
const mapStateToProps = (state, ownProps) = {
return {
counter : state.counter,
someComponentValue : state.things[ownProps.someIdProp]
};
}
@Jalalhejazi
Jalalhejazi / API_get_recent_posts.js
Created April 21, 2013 03:50
AJAX: SuperWebApps.dk API get_recent_posts JSON
//http://jsfiddle.net/jalalhejazi/wWPs5/
$(function () {
//Add ul html to body
$('body').html('<ul id="results">');
//Call JSONP to CORS SuperWebApps.dk/API REST.get
$.ajax({
type: 'get',
dataType: "jsonp",