Skip to content

Instantly share code, notes, and snippets.

View AlexHenkel's full-sized avatar

Alejandro Henkel AlexHenkel

View GitHub Profile
@AlexHenkel
AlexHenkel / conekta-expo-rn.jsx
Last active January 14, 2023 21:31
Render props component to use Conekta with Expo in React-native
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Constants } from 'expo';
import { WebView } from 'react-native';
import { CONEKTA_KEY } from 'react-native-dotenv';
class Conekta extends Component {
deviceId = Constants.deviceId.replace(/-/g, '');
tokenizeCard = card =>
@AlexHenkel
AlexHenkel / Form.jsx
Last active April 30, 2019 02:25
Simple form component
import React, { Component } from "react";
export default class Form extends Component {
// Guardamos directamente en el state nuestros valores del formulario inicializados con string vacío
state = {
firstName: "",
lastName: "",
email: ""
};
@AlexHenkel
AlexHenkel / Navbar.js
Last active July 30, 2018 14:39
React navabar component using Redux
import React from "react";
import { connect } from "react-redux";
import LoadingBar from "../components/LoadingBar";
const Layout = ({ auth, name, avatar, loading }) => (
<div>
{loading ? (
<LoadingBar />
) : auth ? (
<div>