Skip to content

DerekCuevas/workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors