React

Description

Flashcards on React, created by Amber JS on 30/07/2019.
Amber JS
Flashcards by Amber JS, updated more than 1 year ago
Amber JS
Created by Amber JS almost 5 years ago
5
0

Resource summary

Question Answer
What does useState() give us? The first variable is the value. Similar to this.state The second variable is a function to update that value. Similar to this.setState
The useState argument is ? the initial state value. for example, our counter,can started at 0. const [count, setCount] = useState(0);
what is React Hooks? Con la nueva característica de React, llamada Hooks, podremos utilizar los componentes funcionales para sacar todo el potencial a la librería. Algo que, hasta hace poco, sólo era posible con las clases. Los Hooks son una nueva API de la librería de React que nos permite tener estado, y otras características de React, en los componentes creados con una function.
how to import use State API import React, { useState } from 'react';
Como se implementa multiples estados de variables con react hooks? import React, { useState } from 'react'; function AllTheThings() { const [count, setCount] = useState(0); const [products, setProducts] = useState([{ name: 'Surfboard', price: 100 }]); const [coupon, setCoupon] = useState(null); return <div>{/_ use all those things here _/}</div>; }
This is what the Effect Hook is for? Side-effects are things you want your application to make like: Fetching data Manually changing the DOM (document title) Setting up a subscription
Show full summary Hide full summary

Similar

ReactJS Curso
Pedro Leon
Javascript Básico Nivel 1
Alvaro Ruiz
Validación de formularios con Javascript
Alejandro Villamizar
Lenguajes de programación
Samantha Gonzalez Lopez
Test POO, Javascript y Polymer
Mariano Sánchez Noya
Test Polymer
Gerardo Javier Aramayo
Operadores en JavaScript
Diego Santos
Software Development
jorsh x
Lenguaje de programación
fabiola flores
PRACTICA #1 SUBLIME TEXT
MARIANA CASTILLO
Descripción del Curso
Andrés Velásco5802