Giter VIP home page Giter VIP logo

react-hooks-in-action's Introduction

React Hooks in Action

Book about React Hooks

Chapter 2: Managing component state with the useState hook

  • Whether it’s fully server-rendered, a mobile app, or all in a browser, your application’s user interface should represent the current data, or state, at the time of rendering.

  • 2.1. Setting up the bookings manager app.

    • Create the project.
      • npx create-react-app react-hooks-in-action,
    • install react Router.
      • npm i history react-router-dom@next
    • Creating Components.
  • 2.2 Storing, using, and setting values with useState. - Asking React to manage component state values by calling useState
    - Calling useState returns a value and its updater function in an array with two elements. - When users sets the value with useState react runs the component again and generate the update UI. - Changing state values and triggering re-renders with an updater function - Using the previous state to help generate new state values

  • Managing multiple pieces of state

  • Considering how React and components interact to persist and update state and synchronize state and UI

Book Resources

- Repository with the code of the book https://github.com/jrlarsen/react-hooks-in-action.

react-hooks-in-action's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.