Add Friend to MySQL Database
In this tutorial, I’ll show you how to add friends to a MySQL database. This will allow a user to follow other users. We will then save that relationship in the database. Then, a user would be able to see posts from any of the users that they’re following.
This is a continuation of our MusicTalk app. An app like Facebook, but people talk about music.
π₯ Previous videos include:
Create Node/Express and React App: https://youtu.be/dICDmbgGFdE
How To Create A Database: https://youtu.be/wba73az4-R0
Connecting Our App To Database: https://youtu.be/syA6vUaZtOM
Using React Router v6: https://youtu.be/GC1LcEwTtZo
Using Redux Toolkit (w/ Redux Thunk!): https://youtu.be/x4H3HYPx3yQ
Authentication & Encrypting a Password: https://youtu.be/aAldUjdRyPA
β° Timestamps:
0:00 – Intro
1:29 – AddFriend Function
4:56 – Display βAdded!β Once Added
9:13 – Create Post Route
11:34 – MySQL Database Query
14:49 – Finish Route and Test
18:17 – Outro
π Affiliate links to some of my gear π€πβ€οΈ
(Best quality for the best price from my research)
Maono Microphone: https://amzn.to/3Wv3ah0
Logitech Webcam: https://amzn.to/3qb0p8M
Rival Mouse: https://amzn.to/3MUtezd
Wrist Pads: https://amzn.to/421vQQ4