Complete React Tutorial (& Redux) #41 - Blog Detail Page

preview_player
Показать описание
Hey gang, in this video we'll look at mapping a single blog post to our props for the blog detail component.

----------------------------------------

🐱‍💻 Course Links:

----------------------------------------

Рекомендации по теме
Комментарии
Автор

@3.53 this is why you are fast becoming the best dev tutor on youtube Shaun. Demystifying the syntax most other tutorials skim over. This series is world class as always. Thank you.

maxiequa
Автор

Took me about 20 mins to figure out why my post object was undefined after mapStateToProps. Shaun used id as string and I used it as number.. so post.id === id didn't match anything in posts. Thank you for the awesome tutorial!

sdymj
Автор

Thank you for explaining this in a non-overwhelming way. You are a great teacher.

luizamusic
Автор

Thanks you so much for this series, it has really been educational and effective studying with you!

One thing here - in "mapStateToProps" function in "Post.js", the operator "===" is too strict because of type mismatch between "id" and "post.id".
For me at least it didn't work.
Would recommend changing it there to "==".

noamhoze
Автор

Thank you again for this amazing tuto !
Yo guys ! you need to parse the ID to Int before doing the check or replace '===' with '=='

const mapStateToProps =(state, ownProps)=>{
let id =
return {
post : state.posts.find(post => post.id === parseInt(id))
}

}

jovision
Автор

The easiest react redux explanation ! Thumb up

laipaulim
Автор

I can't believe this is free.. May God bless u brother!!

mm-et
Автор

Hi Net Ninja,
how does react understand that ownProps are the props coming from the router?

farukdurusoy
Автор

When I was watching this video I faced a problem in "find" method as the id receiving from url is string and the post id is a number. I solve this
const id =
return {post:
Happy learning.

nasaruddin
Автор

you are the best brother .. although i was designer and was see coding is horrible but with you make it more easy to me .. like a game .. i hope an one day to be smart like you .. thank you

alsaamit
Автор

thank you, thanks to this video, I managed to access the store state from another component and display the data on this component

e-genieclimatique
Автор

Thank you so much for your amazing tutorials! You're a hero :)

techture
Автор

Shaun, seriously i love you. I am not gay :D

ASoftwareEngineer
Автор

Thanks, Bud...You are an Amazing Instructor.

rohitbhambhani
Автор

I had to parseInt() the params comming from the url otherwise I would have to use == and the console was giving me an warning to use ===

lucasmrtiins_
Автор

wow this is complex I will need to watch this part of the tutorial another 20 times :D

russelldriver
Автор

in 3:20 could just be

post: state.find() instead of post: state.posts.find() because we just have posts on the state of the store?

arrozfritoo
Автор

Hello I'am coming from react native
Thankx maaan
every thing working with me

mohamdalmhde
Автор

Great video like all of them! One comment: The reason you can simplify the function syntax is technically not because it fits on one line but because you pass only one variable and only one expression. Pls correct my if I'm wrong.

we.are.awakening
Автор

Thank u for this awesome video and series

AbhishekKumar-mqtt