- Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
- Opcional: Si usamos Fetch API en el proyecto:
| <h1> Nuevo evento </h1> | |
| <hr /> | |
| <form className="container"> | |
| <div className="form-group mb-2"> | |
| <label>Fecha y hora inicio</label> | |
| <input className="form-control" placeholder="Fecha inicio" /> | |
| </div> | |
| <div className="form-group mb-2"> |
| /* Modal */ | |
| .ReactModalPortal > div{ | |
| opacity: 0; | |
| } | |
| .ReactModalPortal .ReactModal__Overlay { | |
| align-items: center; | |
| display: flex; | |
| justify-content: center; | |
| transition: opacity .2s ease-in-out; |
| export const messages = { | |
| allDay: 'Todo el d铆a', | |
| previous: '<', | |
| next: '>', | |
| today: 'Hoy', | |
| month: 'Mes', | |
| week: 'Semana', | |
| day: 'D铆a', | |
| agenda: 'Agenda', | |
| date: 'Fecha', |
| import React from 'react'; | |
| import './login.css'; | |
| export const LoginScreen = () => { | |
| return ( | |
| <div className="container login-container"> | |
| <div className="row"> | |
| <div className="col-md-6 login-form-1"> | |
| <h3>Ingreso</h3> | |
| <form> |
| import { createSlice } from '@reduxjs/toolkit'; | |
| export const templateSlice = createSlice({ | |
| name: 'name', | |
| initialState: { | |
| counter: 10 | |
| }, | |
| reducers: { | |
| increment: (state, /* action */ ) => { | |
| //! https://react-redux.js.org/tutorials/quick-start |