Git Product home page Git Product logo

workshop's Introduction

Workshop

React Hooks

Day 3 - React Architecture: State Management and Side Effects

State Management

React is a state management library

https://kentcdodds.com/blog/application-state-management-with-react

Key concepts

  • global vs local state
  • single source of truth
  • derived state, memoization
  • observability

Libraries

Side effects (Redux only)

Day 2 - Getting Started with React & Apollo Client

Day 1 - Backend with GraphQL

  • Discuss Project Goal (Building a simple e-commerce website)
    • Why e-commerce is a good example?
  • Setup Apollo Server
    • Hello World Server
  • GraphQL Overview (see below)
  • Defining Types and Queries
    • Review Scalar Types
    • Create Product Type
    • Create Simple Product Query
    • Create Product Query with Arguments
  • Homework Assignment
    • Expand Products to have Categories
      • Products can belong to many Categories
    • Expand Products to have Review
      • Products can have many reviews

GraphQL Overview/Talking points

GraphQL vs REST

GraphQL is RESTful in many ways (client-server, stateless)

Pros:

  • Increased client flexibility and control
  • Simplified backend API. No need for many custom API routes that serve similar data.
  • Standard for documentation
  • Developer tools

Cons:

  • Less optimal performance.
  • Caching. No obvious key. Doesn't fit well with HTTP caching semantics
  • Compatibility with HTTP. Typical to not use stadard HTTP semantics (methods, error handling)

Usefull tools

React.StrictMode

workshop's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

workshop's Issues

Questions from workshop 1

  1. How is root typed in Typescript? (In the resolver map)
  2. Does every object that gets passed back to the client essentially get JSON parsed since it has to resolve every field of every object? Have you seen any performance issues with this in production/scale?

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.