Full Stack Web Development Course [15] | ReactJS, NodeJS, MySQL - Profile Page

  Рет қаралды 17,059

PedroTech

PedroTech

Күн бұрын

Пікірлер: 49
@KyleKatarn145
@KyleKatarn145 2 жыл бұрын
Really enjoyed this series man. I've been following along and noodling at the project myself just to make it more feature rich, and one thing I can add to it: In the useEffect where you pull the user information and their posts from the backend, if you set the dependency params of the useEffect to the id variable from the useParams hook, it will allow the page to refresh every time you switch between profiles. I added a link to the navbar where your username is which will take you straight to your profile page wherever you were in the web app. I then noticed that if I was in another user's profile, and clicked it, none of the information would update, and that's how I found out about the id param.
@OmnispectiveHub
@OmnispectiveHub 2 жыл бұрын
DUDE I was losing my mind why it wouldn't update the content, much appreciated!
@levyroth
@levyroth 3 жыл бұрын
Woop woop! This is really good, was looking forward to this video.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hope you enjoyed it!
@arcadestudio2506
@arcadestudio2506 3 жыл бұрын
superrrr seriously i was doing this job and stuck here and you make supb easy to me thank you ... seriously thank you from now i can call pedro great !!!! you read my mind !!!!!
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hahaha thank you! Appreciate the support!
@webapple1
@webapple1 2 жыл бұрын
previous video you fixed the bug with get token from local storage, inside in the axios repsonse i did an if else statement ; if response.data.listOfPosts && likedPosts - set posts and setliked posts ELSE navigate('/login') , BECAUSE if the token isnt valid on the back-end it doesnt return the arrays/data and therefor the else is triggered. i found it a cleaner fix.
@varaprasad4163
@varaprasad4163 3 жыл бұрын
Hi Pedro! your explanation is like a cakewalk. please make a video on AWS lambda. I already asked you earlier. Thank you.
@heyiamigor
@heyiamigor 3 жыл бұрын
would be nice!
@PanlasangMotour
@PanlasangMotour 3 жыл бұрын
Ayyy waiting for this
@shivkirpamultisolution6215
@shivkirpamultisolution6215 3 жыл бұрын
hey pedrotech i have a ques.. suppose we already have created a table in database without using the model in sequelize then how can i connect it to my backend using sequelize? is there any way ?
@heyiamigor
@heyiamigor 3 жыл бұрын
Yo, thanks for the another awesome episode! How about adding an ability to add a Profile pic and an ability to upload images when creating a post?
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hey Igor, I was thinking about doing that but tbh I don't want to drag the series any longer because I want to post other videos for those who are not watching the series! I do have a video on uploading images in react if you are interested!
@IgorShevchenkoUSA
@IgorShevchenkoUSA 3 жыл бұрын
@@PedroTechnologies Yeah, it makes total sense. I understand, no problem! Can’t wait to see your other content and learn from you. And thanks again, I will check out the image upload video that you mentioned!
@drawingdr9829
@drawingdr9829 3 жыл бұрын
the same
@scooble
@scooble 3 жыл бұрын
@29:35 I attempted to change the code so that when the user logs out, the page would be redirected to the Login page. I imported 'useHistory', created a history variable and within the App.js file under the logout function, I used this piece of code; history.push('/login'); However, I got an error which said "Cannot read property 'push' of undefined" This wasn't what I expected. What have I done wrong?
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Interesting. Can you paste your code for the app.js here?
@scooble
@scooble 3 жыл бұрын
@@PedroTechnologies I'll email it to you
@alexandreanania435
@alexandreanania435 3 жыл бұрын
Hi there ! I have the same issue and I'm interested in the solution :)
@scooble
@scooble 3 жыл бұрын
@@alexandreanania435 . I tried downloading episode 15 from Github, tried putting a history.push('/login') redirect in and had the same problem. I dont have enough technical understanding or React to know why it does it. However, Pedro did email me and suggest putting this line of code in the logout function; window.location.pathname = "/login" This works a treat!
@alexandreanania435
@alexandreanania435 3 жыл бұрын
@@scooble Thank you very much for you answer !
@PanlasangMotour
@PanlasangMotour 3 жыл бұрын
Next up upload profile image and files uploader and it will reflect to your file section
@lokmanlife3023
@lokmanlife3023 3 жыл бұрын
late to the party.. as always, nice vid man.. more on the profile page, can you expand on it by teaching how to add, edit, delete information in them.. thanks in advance.. keep it up the good work
@ballonura
@ballonura 3 жыл бұрын
Hey Pedro, How long this series gonna be ? I wanna take it in one shot. Thx.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
17 episodes! Last episode coming tuesday!
@lefinancier2.0
@lefinancier2.0 2 жыл бұрын
Hey Pedro can you add a video showing how to restart node server automatically when it crashes?
@DawsonJBailey
@DawsonJBailey Жыл бұрын
if anyone is having weird db issues try dropping all tables
@medhenibenelghali6264
@medhenibenelghali6264 3 жыл бұрын
hey sir i have some problem in my application the server still updating my DB 1000 in sec and my app runnig slowly... :/ so haw i can fix that and thx
@benjieburillo5863
@benjieburillo5863 3 жыл бұрын
hi Pedro!, have you tried to use prisma instead of sequelize?, i hope you also make an tutorial for prisma
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
One of the founders of Prisma contacted me about it and since then I tried it sometimes. I might make a tutorial ;)
@benjieburillo5863
@benjieburillo5863 3 жыл бұрын
wow thats nice 🙂. i always follow your new tutorial. I'm new to react and express 😁👍
@viietwalkerr
@viietwalkerr 3 жыл бұрын
I was following the tutorial and the useParams for id in the profile axios is not working. The route I think is fine because the get request works in axios, but in the console the object data is empty because instead of using the id number from the url, it's showing undefined any help?
@quintonpangyixuan3990
@quintonpangyixuan3990 2 жыл бұрын
Should be const{ id } = useParams()
@PanlasangMotour
@PanlasangMotour 3 жыл бұрын
Bro Have you tried making ah nodejs react app on AWS lambda
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Never used AWS lambda, but I might soon!
@Smokusek
@Smokusek Жыл бұрын
I have a problem with Post page. I'm getting CONNECTION_REFUSED in /auth and /posts/byId/1 and /comments/1 no idea why. I thought i might have misspelled sth so i copied your code and it still doesn't work :( Everything works except that Post.js and adding comments even in Insomnia
@Smokusek
@Smokusek Жыл бұрын
My whole backend is copy paste now. Post page as well. Only thing i changed is useHistory to useNavigate
@Smokusek
@Smokusek Жыл бұрын
And it just won't work.
@Smokusek
@Smokusek Жыл бұрын
If someone has same issue, try dropping all tables and restart your server to automatically create new ones. Worked for me.
@TrendSpree1
@TrendSpree1 3 жыл бұрын
THANK YOUUU
@Theo-vl3dy
@Theo-vl3dy 2 жыл бұрын
This series is really awesome, but I seem to have an error that I can t solve :( After I login, my token is created, and everything is fine. But as soon as I refresh the page, the authState goes back to the initial form, as if I weren't logged in. But my token is still in the local storage. And I get the following error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'error'). This refers to this line of code: if(response.data.error) {setAuthState({ ...authState, status: false });. I really don t know how to solve this, if anyone has any ideas, please
@quintonpangyixuan3990
@quintonpangyixuan3990 2 жыл бұрын
Check ur use Effect, might be having errors
@quintonpangyixuan3990
@quintonpangyixuan3990 2 жыл бұрын
kzbin.info/www/bejne/r2WVaXWVdtarmpI this is for ur reference
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 449 М.
I built 10 web apps... with 10 different languages
14:23
Fireship
Рет қаралды 1,7 МЛН
Как наука победила религию
17:02
Кем был убитый в Москве Армен Саркисян
16:59
BBC News - Русская служба
Рет қаралды 61 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 289 М.
Trump's Plan for "Greater America" Explained
8:42
TLDR News Global
Рет қаралды 759 М.
40 APIs Every Developer Should Use (in 12 minutes)
12:23
Coding with Lewis
Рет қаралды 410 М.
🪄Вечная спичка #diy #выживание #поход
1:00
Короче, ВИ
Рет қаралды 2,8 МЛН
Таким раствором работать одно удовольствие
1:00
Профессия созидатели
Рет қаралды 954 М.
СИЖУ БЕЗ ЕДЫ, ПЬЮ ОДНУ ВОДИЧКУ.
21:37
Быть Добру
Рет қаралды 79 М.