- 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:
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 |
#!/usr/bin/env python | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import cv2 | |
import sys | |
class MainApp(QWidget): | |
def __init__(self): |
export const heroes = [ | |
{ | |
'id': 'dc-batman', | |
'superhero':'Batman', | |
'publisher':'DC Comics', | |
'alter_ego':'Bruce Wayne', | |
'first_appearance':'Detective Comics #27', | |
'characters':'Bruce Wayne' | |
}, | |
{ |
<!-- Menú de paginación --> | |
{% if is_paginated %} | |
<nav aria-label="Page navigation"> | |
<ul class="pagination justify-content-center"> | |
{% if page_obj.has_previous %} | |
<li class="page-item "> | |
<a class="page-link" href="?page={{ page_obj.previous_page_number }}">«</a> | |
</li> | |
{% else %} | |
<li class="page-item disabled"> |
{% extends 'core/base.html' %} | |
{% load static %} | |
{% block title %}Perfil{% endblock %} | |
{% block content %} | |
<style>.errorlist{color:red;} label{display:none}</style> | |
<main role="main"> | |
<div class="container"> | |
<div class="row mt-3"> | |
<div class="col-md-9 mx-auto mb-5"> | |
<form action="" method="post" enctype="multipart/form-data">{% csrf_token %} |
{% extends 'core/base.html' %} | |
{% load static %} | |
{% block title %}Iniciar sesión{% endblock %} | |
{% block content %} | |
<style>.errorlist{color:red;}</style> | |
<main role="main"> | |
<div class="container"> | |
<div class="row mt-3"> | |
<div class="col-md-9 mx-auto mb-5"> | |
<form action="" method="post">{% csrf_token %} |