GoConqr has a new look! Let us know what you think.

Flashcards

React

Amber JS Spanish 7 cards

Cards in this deck (7)

  1. 1What 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
  2. 2The useState argument is ?the initial state value. for example, our counter,can started at 0.
    const [count, setCount] = useState(0);
  3. 3what 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.
  4. 4how to import use State APIimport React, { useState } from 'react';
  5. 5Como 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 {/_ use all those things here _/}
    ;
    }
  6. 6This 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
  7. 7—

Information

Description
Flashcards on React, created by Amber JS on 30/07/2019.
Created by
Amber JS
Views
10
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?