Want to persist your data between page loads? You need a backend! Becoming a full stack developer means learning the ins and outs of how to add a backend that your frontend in React can interact with. In this video we will take an existing React app using Google Maps, and using Next.js (API routes), Prisma 2, and Postgres, we will learn how to read data from, and save data to our database.

  • 00:00 - Introduction
  • 05:40 - Setting up Prisma 2
  • 09:05 - Defining Prisma Schema
  • 14:30 - Next.js API Routes
  • 19:30 - Creating Sighting w/ Prisma
  • 24:20 - Fetching Sightings w/ Prisma
  • 27:01 - react-query useQuery
  • 31:30 - react-query useMutation
  • 40:00 - Optimistic UI w/ react-query

#react #next #prisma #postgres #database

Building a Backend for React with Next.js, Prisma 2, and Postgres
13.35 GEEK