Aren't you creating a circular dependency between ProductCard and ProductCardDescription? One of the rules in projects I work on is to never import anything from parent components.
useReducer sam vec napravio pogledaj video 25 iz ove serije. useContext je 12 video u ovoj seriji. Samo je ostao typescript to cu svakako odraditi u nekom od sledecih videa
Do you have an example of this but for render dinamically and those flags you defined at the start being properties of each element of an array? I dont get the concept if is not going to be used for just hardcoded stuff
@@CodewithSloba The first version looked better. You create a component in one place and use it in many. Let it look messy in one place rather than everywhere else. This is purely my opinion and I could be wrong. (Translated by DeepL)
@@СамирАбасов The thing is that compound components doesn’t look messy, they are much cleaner. Sometimes more code means more readability. Also this way component implementation is much simpler and more protected from bugs and weird logic. Also it’s much more versatile
Aren't you creating a circular dependency between ProductCard and ProductCardDescription? One of the rules in projects I work on is to never import anything from parent components.
if there is a circular dependency I'm pretty sure it would crash.
@@CodewithSloba no, it won't crash, but you're creating a potential case that's hard to debug.
I see your angle
This sounds like something you would want to do early in a project. If you don't the refactor might be a nightmare!
Yes absolutely, all design and architectural decisions should be made as early as possible.
That’s why planning is so important
Amazing content, thank you. I finally understood why and how to use this pattern with your example.
Glad it was helpful!
Very good video and simple explanation. 🥳
thanks
Perfect video, I was struggling to get the concept but your video made it clear! Thanks!
I'm glad you like it
Da li mozes napraviti video na temu typescript i useContext & useReducer.
useReducer sam vec napravio pogledaj video 25 iz ove serije. useContext je 12 video u ovoj seriji. Samo je ostao typescript to cu svakako odraditi u nekom od sledecih videa
Do you have an example of this but for render dinamically and those flags you defined at the start being properties of each element of an array? I dont get the concept if is not going to be used for just hardcoded stuff
I don't have concrete example but this should give you just an idea
Thanks for the awesome video! One of the very few videos that explained this properly!
I'm glad you like it!
Nice.
Thanks!
Thanks for the clear explanation with simple example.
Glad it was helpful!
Perfect thank you.
You’re welcome
Great explaination!
thanks!
Great ..❤
thanks
Thank you, but I do not like it
Why not?
@@CodewithSloba The first version looked better. You create a component in one place and use it in many. Let it look messy in one place rather than everywhere else. This is purely my opinion and I could be wrong. (Translated by DeepL)
@@СамирАбасов The thing is that compound components doesn’t look messy, they are much cleaner.
Sometimes more code means more readability. Also this way component implementation is much simpler and more protected from bugs and weird logic.
Also it’s much more versatile
Hvala veliko Slobo, dobro objasnjeno.
Nema na čemu!