Пікірлер
@wexwexexort
@wexwexexort 2 күн бұрын
didn't know we were doing tbd. nice vid.
@michelhenrique1560
@michelhenrique1560 3 күн бұрын
looking foward to the course
@Deus-lo-Vuilt
@Deus-lo-Vuilt 15 күн бұрын
Thank you, nice video I liked it
@Deus-lo-Vuilt
@Deus-lo-Vuilt 19 күн бұрын
This is super interesting, I hope you upload more videos like this implementing architecture and good practices
@Deus-lo-Vuilt
@Deus-lo-Vuilt 20 күн бұрын
Like and sub
@sayedaliaqamousavi9064
@sayedaliaqamousavi9064 24 күн бұрын
The best tutorials. All comes from years of awesome work experience. 👏
@GBCisPeak
@GBCisPeak 24 күн бұрын
video editing nice and clear 👍
@caczus
@caczus 25 күн бұрын
Don't you think it is possible to try to have a structure that allows more colocation? I think in that case it would be easier and more straightforward to navigate the repository: for example, if I need to make changes or check some details of the "user," I know that I will find everything within the "user" folder, from the "infrastuctural" parts down to the "domain" parts
@muthukumar604
@muthukumar604 26 күн бұрын
Hey can you teach how to setup vite like you setup repo
@romanpisani8157
@romanpisani8157 27 күн бұрын
As an intern, until now I was confused by why the queries were all react hooks and how it worked. Thank you for this amazing video, perfect timing!!!
@lampshade5437
@lampshade5437 27 күн бұрын
I don't know how much attention you get on these, but I really look forward to each one you make! Like, seriously great content man. You don't see this sort of stuff anywhere else :)
@profydev
@profydev 26 күн бұрын
@@lampshade5437 thanks so much for the feedback. It’s not too much attention to be honest. There might be one more video coming in the series. Not sure yet. But I really appreciate your nice words
@tomershechner
@tomershechner 27 күн бұрын
Amazing series
@feeyz6638
@feeyz6638 Ай бұрын
Is there a reason why you used the class based approach for dependency injection in the video compared to the pull request where you have just passed the api as a dependency to each service function? IMO the approach in the video looks cleaner. Im just curious what your thoughts were about that. This video series is really amazing. Thanks for that :)
@profydev
@profydev 29 күн бұрын
@@feeyz6638 there were a few problems when passing the class based service functions as dependencies to the replyToShout function. I’d have to call the bind function for each of those methods which felt annoying. Finally a comment on Reddit pushed to the other more functional implementation
@allaithbitar1199
@allaithbitar1199 Ай бұрын
Keep it up 👏🏻
@xiiEJRAM
@xiiEJRAM Ай бұрын
The traceability is bad here and not all the logic need to be extract to domain layer
@codinginflow
@codinginflow Ай бұрын
Nice video! Are you German?
@profydev
@profydev Ай бұрын
@@codinginflow yes, thanks
@codinginflow
@codinginflow Ай бұрын
@@profydev Me too!
@devvvvvvvvvvvv
@devvvvvvvvvvvv Ай бұрын
2:45 - I disagree about using refs to access the dom in 2024. Ref access was Reacts way of hiding their performance issues back in the day. But dom access is fine now. 10 years later good grief.
@pizzaitaliana9835
@pizzaitaliana9835 Ай бұрын
Great video as always mate! Keep up the good work. Thanks 👍
@sayedaliaqamousavi9064
@sayedaliaqamousavi9064 Ай бұрын
Another awesome video tutorial for the ones who are seeking how to become clean coder. I love clean coding videos and security practices in coding. ❤
@mrlectus
@mrlectus Ай бұрын
Pleas make video for unit testing
@ReuelTeodoro
@ReuelTeodoro Ай бұрын
This is not in the playlist
@profydev
@profydev Ай бұрын
Thanks, I added it now
@t1nytim
@t1nytim Ай бұрын
I think another disadvantage is, when you get into increasingly difficult scenarios, it leads to more and more abstraction. And so it becomes harder to come up with a function signature that upon reading explains what's happening. Because it's so abstract from the layers doing the work, there could be 20 different ways to achieve what your function is stating it does. And I don't think turning your function name into a sentence changes that either. Where when you work under locality of behavior, your what and how should be in the same place, and so it becomes easier to figure that out.
@mrlectus
@mrlectus Ай бұрын
is domain the same as services?
@snivels
@snivels Ай бұрын
Do you keep your react query useQuery hooks and data fetching functions in the infrastructure layer or domain layer? Amazing video, like others have said you're actually explaining things have meaning to people and teach people good principles.
@profydev
@profydev Ай бұрын
@@snivels thanks a lot for the feedback. I added the fetch functions to the infrastructure layer as they connect the app with external systems like rest APIs. The query hooks are an interesting question though. Putting framework code (here react hooks) into the infrastructure layer feels wrong because it makes that layer dependent on the framework. At the same time you probably have one query hook per endpoint and thus endpoints and query hooks are tightly connected. In the next episode I delay that decision by adding the query hooks to a separate “application layer”. But I don’t really like that approach and will refactor everything to reflect feature folders. Then I’ll add the query hooks to the infrastructure layer. Here’s the code for the next episode in case you’re interested: github.com/jkettmann/react-architecture/pull/15 About the domain layer: it should be isolated from infrastructure code like data fetching and independent of frameworks like react. So you would neither put query functions nor query hooks there. When it comes to the domain layer you can always ask yourself: “if I wanted to exchange react for something else could I leave the domain layer untouched?” If you can answer with yes then you already did a lot of things right 🙂
@ZiaCodes
@ZiaCodes Ай бұрын
Please continue these kinda videos, especially naming the variables, functions, pages, components, like infoPanel, infoContainer, infoWrapper, infoParent, infoBox etc for example if I'm using infoPanel, and I need a similar component name so what should I name it from above list? That would help
@nickolaki
@nickolaki Ай бұрын
Would you not prefer a class for the User here rather than a file with methods etc.
@profydev
@profydev Ай бұрын
@@nickolaki Classes don’t work well with react because it requires immutability for state updates. In general classes offer nice encapsulation but here simple functions do the job as well
@RJRobinsonX
@RJRobinsonX Ай бұрын
These videos are amazing. I very much enjoy your calm explanations. Solid work!
@profydev
@profydev Ай бұрын
@@RJRobinsonX thanks a lot for the feedback
@idohadad3039
@idohadad3039 Ай бұрын
I can only speak for myself, but after having a go at projects, this type of videos are much more helpful than most of the web dev content I've seen. Thanks!
@user-yz2mv8kn4x
@user-yz2mv8kn4x Ай бұрын
learning alot from these series. I find these refactoring videos extremely helpful and insightful compared to alot of tutorials (everyone coded up in one go with minimal explanation). understanding why you made these choices and the tradeoffs involved was invaluable and will definitely apply to my own projects and work. Thank you so much for your amazing lessons
@profydev
@profydev Ай бұрын
@@user-yz2mv8kn4x thanks for the feedback. I really appreciate it
@ericsiddiq7634
@ericsiddiq7634 Ай бұрын
Very nice content ❤
@joseeavr
@joseeavr Ай бұрын
question, isn't bad practice naming react components in kebab case?
@profydev
@profydev Ай бұрын
You mean kebab case for file names? No that's not bad practice. In fact it has advantages over e.g. PascalCase when you or your teammates are on Mac: x.com/kentcdodds/status/1249870276688371713
@BenjaminAbolade
@BenjaminAbolade Ай бұрын
How can we access the code ?
@profydev
@profydev Ай бұрын
@@BenjaminAbolade here it is. Check the PRs for the code changes for each video/article. github.com/jkettmann/react-architecture
@BenjaminAbolade
@BenjaminAbolade Ай бұрын
Just the perfect video for all react developers at all levels. Nice work. Waiting to see more great content.
@marlonsabijon1500
@marlonsabijon1500 Ай бұрын
Boom... subscribed!
@benjamincardona5444
@benjamincardona5444 Ай бұрын
I like the video however one thing to point out. That is not dependency injection, it's dependency inversion 😅 Dependency injection applies dependency inversion by dynamically injecting the implementations (or so i've been told). I cannot wait to see the vertical slice transformation. As of now the only difference i see is that we've moved from traditional react architecture to clean architecture and the layers are always the headache for any type of application. Rare content BTW
@poncho678
@poncho678 Ай бұрын
Great stuff!
@kanz831021
@kanz831021 Ай бұрын
thank you for all your efforts. These kind of videos are really rare. keep making these invaluable content!
@SalmanKhan-lx9kp
@SalmanKhan-lx9kp Ай бұрын
Next level stuff, loved it. Thanks a lot.
@omarbsoul8419
@omarbsoul8419 Ай бұрын
Thanks for this content, I have one question, introducing classes would violate the functional programming nature of react, no?
@malachihabib9068
@malachihabib9068 Ай бұрын
Great content, can't wait for the full course!
@javiervazquezfernandez1872
@javiervazquezfernandez1872 Ай бұрын
My confirmation bias is right now over 9000!! I love that you are not aiming for a silver bullet but always explaining pros and cons
@kaluczadzsi
@kaluczadzsi Ай бұрын
Do more junior refactor videos!!❤
@ibraheemhaseeb3660
@ibraheemhaseeb3660 Ай бұрын
Damn, imagine watching these videos, joining a company as junior dev and writing such code what he wrote after refactoring.
@najlepszyinformatyk1661
@najlepszyinformatyk1661 Ай бұрын
2:30 Wait and where is the problem? From my viewpoint, there is no problem with testing whatsoever, because by testing in this manner, we can relay that it works as expected. Otherwise we test implementation details which can lead to the cost to maintain such tests if implementation details change even if the underlying behavior stays the same.
@profydev
@profydev Ай бұрын
In this case we have a couple of scenarios that basically lead to the same result: an error message shown in the form. If we’d test these scenarios with integration tests we’d have to use the same setup logic (e.g. clicking a button to open the dialog, filling out the form, submitting the form, and checking the error message). The only difference would be the API requests and responses. With the logic extracted into a function we can unit test each of these scenarios (which is faster and probably simpler). Then we only need one integration test that verifies that the error message is indeed shown in the UI
@najlepszyinformatyk1661
@najlepszyinformatyk1661 Ай бұрын
@@profydevfor the first part of the answer - you can abstract the repeated test logic to a function and reuse it across test cases
@WoWUndad
@WoWUndad Ай бұрын
"how would i test this component" well id press ctrl+s npm run dev , and check it, duh?
@HDChif
@HDChif Ай бұрын
omg I hate clean archtitecture. makes such a messy code in FE applications
@pieg.6689
@pieg.6689 Ай бұрын
I've seen the code in the github, but i don't think there's an example how to use validation schema like zod with form like react-hook form. Do you have plan to make this in later course?
@buza_me
@buza_me Ай бұрын
Why do you need a custom hook though? 06:29 Is it important for you to have a new function everywhere you use the hook? It does not take any arguments, it can just be a function of type "export const doReplyToShout = (input) => replyToShout(input, dependencies)". It would make the file clean.
@profydev
@profydev Ай бұрын
The reason I used a hook is to make it compatible with react query. But you’re right on this case we could use your approach which would keep it independent of react
@buza_me
@buza_me Ай бұрын
@@profydev I see, you're building it for a future video. I guess if you have some of those as hooks you may as well make every one a hook just for consistency, it makes sense.
@hakanutkuozdemir1407
@hakanutkuozdemir1407 Ай бұрын
I think overall it is a good refactor. But I did not understand the need to create a custom hook. Why not create a new function with the dependencies passed?
@profydev
@profydev Ай бұрын
The reason I used a hook is to make it compatible with react query. But you’re right in this case we could just use a function
@sachingadhari98
@sachingadhari98 Ай бұрын
High quality content mate. Could you also make some content on architecting pagination components.