Комментарии:
You are not supposed to use objects or arrays in the dependency array: ```console.log({} === {}) // false```.
The showcased use of useMemo and useCallback is pointless as it would still rerun on every rerender.
I am not a fan of export default
ОтветитьIm inspired to create my own small social media app too. Im a mid level fullstack developer who wants to be senior soon
ОтветитьStoring an access token in localstorage is not a good practice though.
ОтветитьAll the idiots here knitpicking on the code, for what its worth , its pretty good and understandable 😁, its good enough code thats worth to ship 🚢
ОтветитьWhere is the TypeScript?
ОтветитьI spotted numerous flaws. Where can I add my CR comments?
ОтветитьHey, so I have a question. Which is a better practice : storing authToken in local storage or cookie and why?
ОтветитьIs the useSyncExternalStore important in react hooks ?
Ответитьwhy it passes the userData as props when it could have got that data inside the component itself?
ОтветитьI really enjoyed the video!
As a junior web developer, I appreciate your advice to learn React despite the negative feedback that some users have given it. I'm a little confused as to why people talk negatively about React, since I'm not very familiar with the "dev culture". It would be great if you could provide some guidance to help clear up any confusion.
Thank you!
Putting your access token in the local storage makes your site vulnerable to csrf and xss.
The best practice will be to use cookies for authentication.
tbh, its not that clean or good - relative imports are all over the place - a complex codebase can undergo a lot of refactors - using aliases for paths is always important in such cases
ОтветитьDoes anyone know a perfect nextjs 13 app like this? I would like to learn from it.
Ответить❤👌
ОтветитьHow do I submit a app for review?
ОтветитьWould it make sense to move the useEffects in app container into seperate hooks that way you can clearly see what each one does and they aren’t all in the app container?
ОтветитьThere is no test case. Also we can use absolute path for import which is missing in the codebase
ОтветитьWait, what. Can anyone enlighten me why the accessToken is saved on localStorage????
ОтветитьThank you so much for this video and the owner of repo, it helps a lot! Btw, can I know what is the extension you are using that make the top wrapper name/function pinned at the top? Thanks!!
ОтветитьThere is no such thing as perfect, there is no silver bullet.
ОтветитьHonestly this is kind of bad example because it contains so many problems. At first there are a lot of useEffects going on which do some request and then setting state (setLoadings...) without dealing with unmounting... Additionally looking at the redux part, it is so much boilerplate without adding any value at all, most of the actions/reducers are just fetching data and updating the store. Secondly storing your (access/refesh) tokens in localstorage is just a big security concern. And there are more mistakes which are mostly made by non senior devs...
ОтветитьGreat content, but I can not say that not using a framework is react best practices.
ОтветитьNot using useMemo does not invalidate memo..
The only thing you are optimising with useMemo there is just mapping over an array
can you do a video on your vscode config? 🙏
Ответитьwhat vscode theme is this?
ОтветитьI'll love to rebuild this using and I'll want you to review it
ОтветитьSir please make a video of MERN full stack app of e-commerce site❤..From basic to advance
ОтветитьTo be honest there is so much wrong with this app, cannot believe that dumping server state in redux is still a thing, jeeez...
Ответитьlost 20 iq watching the thumbnail
ОтветитьHey Bro, i'm building one application in reactjs, how i can reach you for reviewing that app
ОтветитьHey, what is your vscode theme?
ОтветитьThis is like 2018 - 2019 grade react 💩... U literally will be fired if u write this in 2023
ОтветитьIt's nice and follows OK practices. TypeScript is a must and should be a GO TO for every new application.
ОтветитьI am working on similar structure everything is so well organized and we are using ts as well.
Ответитьhow can i achieve this kind of clean code and architecture compared to my current shit code ? how do i imporove myself
Ответитьwhy is he storing the auth token in local storage !! is this safe/okay ?
Ответитьthe project doesn't use ESLint at all, for me this is very bad, the "let vs const" situation would be easily found and fixed with the right eslint rules
ОтветитьDamn once I saw this code structure I have a lot to learn
ОтветитьI think putting store creation inside an effect doesn't make any sense, there's no need for that, just create the store outside of that component (import it or above the file), then inject it into the provider, apart from that it seems a good one
ОтветитьBad practice to store auth info in localstorage.
ОтветитьPlease make video over protected user role base routing in react js
ОтветитьNice🎉
ОтветитьIt's a fairly big and complex codebase, if he can code this clean and maintainable without typescript, it's even more impressive 🔥
ОтветитьThank you so much the owner of repo and Cosden for this ! Altho i was disappointed to not see typescript being used, but the code is clean and easy to read. got inspired and learned a lot.
Ответитьkeep up 💪💪 bro.
ОтветитьI don the front end of this website 😁
Ответить