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.
@OmnispectiveHub2 жыл бұрын
DUDE I was losing my mind why it wouldn't update the content, much appreciated!
@levyroth3 жыл бұрын
Woop woop! This is really good, was looking forward to this video.
@PedroTechnologies3 жыл бұрын
Hope you enjoyed it!
@arcadestudio25063 жыл бұрын
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 !!!!!
@PedroTechnologies3 жыл бұрын
Hahaha thank you! Appreciate the support!
@webapple12 жыл бұрын
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.
@varaprasad41633 жыл бұрын
Hi Pedro! your explanation is like a cakewalk. please make a video on AWS lambda. I already asked you earlier. Thank you.
@heyiamigor3 жыл бұрын
would be nice!
@PanlasangMotour3 жыл бұрын
Ayyy waiting for this
@shivkirpamultisolution62153 жыл бұрын
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 ?
@heyiamigor3 жыл бұрын
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?
@PedroTechnologies3 жыл бұрын
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!
@IgorShevchenkoUSA3 жыл бұрын
@@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!
@drawingdr98293 жыл бұрын
the same
@scooble3 жыл бұрын
@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?
@PedroTechnologies3 жыл бұрын
Interesting. Can you paste your code for the app.js here?
@scooble3 жыл бұрын
@@PedroTechnologies I'll email it to you
@alexandreanania4353 жыл бұрын
Hi there ! I have the same issue and I'm interested in the solution :)
@scooble3 жыл бұрын
@@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!
@alexandreanania4353 жыл бұрын
@@scooble Thank you very much for you answer !
@PanlasangMotour3 жыл бұрын
Next up upload profile image and files uploader and it will reflect to your file section
@lokmanlife30233 жыл бұрын
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
@ballonura3 жыл бұрын
Hey Pedro, How long this series gonna be ? I wanna take it in one shot. Thx.
@PedroTechnologies3 жыл бұрын
17 episodes! Last episode coming tuesday!
@lefinancier2.02 жыл бұрын
Hey Pedro can you add a video showing how to restart node server automatically when it crashes?
@DawsonJBailey Жыл бұрын
if anyone is having weird db issues try dropping all tables
@medhenibenelghali62643 жыл бұрын
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
@benjieburillo58633 жыл бұрын
hi Pedro!, have you tried to use prisma instead of sequelize?, i hope you also make an tutorial for prisma
@PedroTechnologies3 жыл бұрын
One of the founders of Prisma contacted me about it and since then I tried it sometimes. I might make a tutorial ;)
@benjieburillo58633 жыл бұрын
wow thats nice 🙂. i always follow your new tutorial. I'm new to react and express 😁👍
@viietwalkerr3 жыл бұрын
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?
@quintonpangyixuan39902 жыл бұрын
Should be const{ id } = useParams()
@PanlasangMotour3 жыл бұрын
Bro Have you tried making ah nodejs react app on AWS lambda
@PedroTechnologies3 жыл бұрын
Never used AWS lambda, but I might soon!
@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 Жыл бұрын
My whole backend is copy paste now. Post page as well. Only thing i changed is useHistory to useNavigate
@Smokusek Жыл бұрын
And it just won't work.
@Smokusek Жыл бұрын
If someone has same issue, try dropping all tables and restart your server to automatically create new ones. Worked for me.
@TrendSpree13 жыл бұрын
THANK YOUUU
@Theo-vl3dy2 жыл бұрын
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
@quintonpangyixuan39902 жыл бұрын
Check ur use Effect, might be having errors
@quintonpangyixuan39902 жыл бұрын
kzbin.info/www/bejne/r2WVaXWVdtarmpI this is for ur reference