Skip to content

Instantly share code, notes, and snippets.

View vistajess's full-sized avatar
💯

Je Vi vistajess

💯
View GitHub Profile
@vistajess
vistajess / gist:ebe76cca24009fd24b15
Last active October 26, 2015 06:34
Create multiple Action creators
import {
// imports here
} from '../constants/ActionTypes';
import axios from 'axios';
Number 1:
export default {
getComments() {
@vistajess
vistajess / gist:c1073d7e89a41981a5c3
Last active October 13, 2015 05:43
Sample React Redux
import React from 'react';
export default class AddForm extends React.Component {
state = {
txt: ''
}
render() {
return(
<div>
@vistajess
vistajess / gist:cb945d09c2705626c5b0
Created October 6, 2015 15:55
Simple React Toggle On/Off with Multiple Components
var Component1 = React.createClass({
render: function() {
var txt = this.props.txt;
return(
<div>
<button onClick={this.handleClick().bind(this)}>
Toggle {txt}
</button>
</div>
);
@vistajess
vistajess / gist:b5d6d97ddf522eea3ccf
Created August 11, 2015 15:28
Sample Modular JS Pattern
(function() {
var customer = {
customer: [],
init: function() {
this.cacheDOM();
this.bindEvents();
this.render();
},
cacheDOM: function() {
this.$el = $('#customerModule');