Skip to content

Instantly share code, notes, and snippets.

View Fercho191's full-sized avatar
🎯
Focusing

Fernando Espinoza Fercho191

🎯
Focusing
View GitHub Profile
@Fercho191
Fercho191 / component.js
Last active December 8, 2018 20:14
Como hacer en Binding de metodos en React. CodeSanbox: https://codesandbox.io/embed/5wo9q2yn9p
import React, { Component } from "react";
class MyComponent extends Component {
constructor(props) {
super(props);
this.state = {
gretting: "Hi"
};
this.handleButtonClick = this.handleButtonClick.bind(this);
@Fercho191
Fercho191 / jsdocObjects.js
Last active December 3, 2018 05:33
Definir forma de un objeto con JSDOC
/**
* @see in https://stackoverflow.com/a/6460748
* @param user Information about User
* @param user.firstName The first name of user
* @param user.lastName the last name of user
**/
const logIn = userInfo => {
doLogIn(userInfo.name, userInfo.email);
}
@Fercho191
Fercho191 / schema.py
Last active December 5, 2018 14:08
Graphene schema with CustomFiltersets
from graphene_django import DjangoObjectType
from graphene import relay, AbstractType
from graphene_django.filter import DjangoFilterConnectionField
from app.models import Leather
from django_filters import FilterSet, OrderingFilter
class LeatherFilterSet(FilterSet):
order_by = OrderingFilter(
fields=(
('created', 'created'),