This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
const App = () => { | |
const [data, setData] = useState({ | |
username: '', | |
password: '', | |
}); | |
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => { | |
setData({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext, useReducer, useState } from 'react'; | |
const myContext = createContext(); | |
const reducerTest = (state, action) => { | |
switch (action.type) { | |
case 'CUALQUIER_NOMBRE': | |
return { | |
...state, | |
dataPbx: [], // aqui se filtra la data o algo asi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const {dbConnection} = require('../database/config'); | |
const cors = require('cors'); | |
class Server { | |
constructor(){ | |
this.app = express(); | |
this.port = process.env.PORT || 4001; | |
this.exampleRoute = "/api/example"; |