Skip to content

Instantly share code, notes, and snippets.

View porfidev's full-sized avatar
⚛️
Now coding react-native

Porfirio Chávez porfidev

⚛️
Now coding react-native
View GitHub Profile
@porfidev
porfidev / App.tsx
Created April 30, 2024 00:07
Chechboxes React Native by porfi.dev
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React, {useState} from 'react';
import {
SafeAreaView,
@porfidev
porfidev / tutorial-formato-numeros.js
Created October 25, 2019 15:38
Complemento para el tutorial del video https://youtu.be/xcFBSCcMfbc
import React from "react";
import "./App.css";
function FormatNumber({ number }) {
return (
<span style={{ color: "red" }}>
{new Intl.NumberFormat("ES-MX", {
style: "currency",
currency: "MXN"
}).format(number)}
@porfidev
porfidev / downloadFiles.html
Created December 7, 2022 22:55
How to download files from Firebase Storage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Download Files from Storage</title>
</head>
<body>
<img id="myImage" alt="imagen prueba"/>
@porfidev
porfidev / uploadFormFiles.html
Created December 6, 2022 04:29
How to Upload form files to Firebase Storage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload FORM FILES</title>
</head>
<body>
<form id="uploadFileForm">
<fieldset>
@porfidev
porfidev / uploadURLFILes.html
Created December 6, 2022 03:54
How to Upload image to Firebase Storage from URL
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload URL FILES</title>
</head>
<body>
<script type="module">
// Import the functions you need from the SDKs you need
@porfidev
porfidev / prueba-react-02.html
Created July 31, 2022 17:02
Actualizar el valor del padre desde el hijo con componentes de clase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>porfi.dev React JS | Prueba 02</title>
<style>
.TabStrip {
display: flex;
flex-direction: row;
}
@porfidev
porfidev / prueba-react-01.html
Created July 30, 2022 17:06
Cambiar el estado de un texto y aumentar el contador de cambios con un efecto en React.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>porfi.dev React JS | Prueba 01</title>
</head>
<body>
<div id="app_container"></div>
@porfidev
porfidev / sumar-radio-button-javascript.html
Created October 4, 2019 16:46
Como sumar los radio buttons de un formulario con Javascript en 2019
<html>
<head>
<title>CAFETERIA</title>
<meta charset="utf-8" />
<style>
body {
background-color: #e1e637;
}
h1 {
color: #ff090e;
@porfidev
porfidev / machine.js
Last active May 4, 2022 23:03
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@porfidev
porfidev / ejemplo.html
Created March 4, 2021 23:07
React component example whit high cost
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<title>React.js Optimization</title>
</head>
<body>
<div id="root"></div>
<script
src="https://unpkg.com/react@17/umd/react.development.js"