Is this the perfect React app? - Code Review

Is this the perfect React app? - Code Review

Cosden Solutions

9 месяцев назад

37,107 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@federicobalzi
@federicobalzi - 23.11.2023 19:21

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.

Ответить
@seekheart2023
@seekheart2023 - 22.11.2023 18:15

I am not a fan of export default

Ответить
@yajraarserotsejay1674
@yajraarserotsejay1674 - 25.09.2023 12:35

Im inspired to create my own small social media app too. Im a mid level fullstack developer who wants to be senior soon

Ответить
@mag2XYZ
@mag2XYZ - 23.09.2023 16:10

Storing an access token in localstorage is not a good practice though.

Ответить
@vishwasrv
@vishwasrv - 16.09.2023 05:04

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 🚢

Ответить
@madsfrost9464
@madsfrost9464 - 14.09.2023 14:25

Where is the TypeScript?

Ответить
@elson_correia
@elson_correia - 13.09.2023 10:17

I spotted numerous flaws. Where can I add my CR comments?

Ответить
@dhruv7827
@dhruv7827 - 12.09.2023 13:10

Hey, so I have a question. Which is a better practice : storing authToken in local storage or cookie and why?

Ответить
@MohammedShibincp
@MohammedShibincp - 11.09.2023 04:31

Is the useSyncExternalStore important in react hooks ?

Ответить
@jswithgd
@jswithgd - 10.09.2023 09:31

why it passes the userData as props when it could have got that data inside the component itself?

Ответить
@andrea_zero
@andrea_zero - 07.09.2023 20:35

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!

Ответить
@mounis
@mounis - 07.09.2023 13:22

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.

Ответить
@PranayKotapi
@PranayKotapi - 07.09.2023 10:20

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

Ответить
@jonasj2627
@jonasj2627 - 07.09.2023 09:19

Does anyone know a perfect nextjs 13 app like this? I would like to learn from it.

Ответить
@icoderdev
@icoderdev - 06.09.2023 14:04

❤👌

Ответить
@swaniketchowdhury
@swaniketchowdhury - 06.09.2023 10:20

How do I submit a app for review?

Ответить
@SurfsUpSeth
@SurfsUpSeth - 05.09.2023 21:55

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?

Ответить
@cbijay
@cbijay - 05.09.2023 08:20

There is no test case. Also we can use absolute path for import which is missing in the codebase

Ответить
@sirelee5169
@sirelee5169 - 04.09.2023 19:16

Wait, what. Can anyone enlighten me why the accessToken is saved on localStorage????

Ответить
@haochen816
@haochen816 - 04.09.2023 09:14

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!!

Ответить
@jwbonnett
@jwbonnett - 03.09.2023 11:28

There is no such thing as perfect, there is no silver bullet.

Ответить
@ilijanl
@ilijanl - 03.09.2023 10:45

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...

Ответить
@sebastianmihaiprisacariu8975
@sebastianmihaiprisacariu8975 - 03.09.2023 09:49

Great content, but I can not say that not using a framework is react best practices.

Ответить
@MarisSamats
@MarisSamats - 03.09.2023 01:38

Not using useMemo does not invalidate memo..
The only thing you are optimising with useMemo there is just mapping over an array

Ответить
@sinkie420
@sinkie420 - 02.09.2023 22:33

can you do a video on your vscode config? 🙏

Ответить
@sinkie420
@sinkie420 - 02.09.2023 22:29

what vscode theme is this?

Ответить
@thelazycoder64
@thelazycoder64 - 02.09.2023 18:56

I'll love to rebuild this using and I'll want you to review it

Ответить
@abhishekcode
@abhishekcode - 02.09.2023 15:08

Sir please make a video of MERN full stack app of e-commerce site❤..From basic to advance

Ответить
@imornar
@imornar - 01.09.2023 23:28

To be honest there is so much wrong with this app, cannot believe that dumping server state in redux is still a thing, jeeez...

Ответить
@7ChaleurAberrante
@7ChaleurAberrante - 01.09.2023 23:02

lost 20 iq watching the thumbnail

Ответить
@SingajogiSudhakar
@SingajogiSudhakar - 01.09.2023 13:54

Hey Bro, i'm building one application in reactjs, how i can reach you for reviewing that app

Ответить
@emiralabuga9451
@emiralabuga9451 - 31.08.2023 23:28

Hey, what is your vscode theme?

Ответить
@vincentarlou1505
@vincentarlou1505 - 31.08.2023 18:51

This is like 2018 - 2019 grade react 💩... U literally will be fired if u write this in 2023

Ответить
@hamza_dev
@hamza_dev - 31.08.2023 11:29

It's nice and follows OK practices. TypeScript is a must and should be a GO TO for every new application.

Ответить
@prajinshiwakoti7490
@prajinshiwakoti7490 - 31.08.2023 10:23

I am working on similar structure everything is so well organized and we are using ts as well.

Ответить
@isaacjon
@isaacjon - 30.08.2023 07:14

how can i achieve this kind of clean code and architecture compared to my current shit code ? how do i imporove myself

Ответить
@iamilyes
@iamilyes - 29.08.2023 22:12

why is he storing the auth token in local storage !! is this safe/okay ?

Ответить
@DavideFicano
@DavideFicano - 29.08.2023 14:02

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

Ответить
@emmanuelezeagwula7436
@emmanuelezeagwula7436 - 29.08.2023 02:38

Damn once I saw this code structure I have a lot to learn

Ответить
@webcodeuniversity
@webcodeuniversity - 29.08.2023 00:34

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

Ответить
@nickolaki
@nickolaki - 28.08.2023 23:41

Bad practice to store auth info in localstorage.

Ответить
@nawazishali274
@nawazishali274 - 28.08.2023 22:21

Please make video over protected user role base routing in react js

Ответить
@nawazishali274
@nawazishali274 - 28.08.2023 22:20

Nice🎉

Ответить
@InfoVerseNetwork
@InfoVerseNetwork - 28.08.2023 21:45

It's a fairly big and complex codebase, if he can code this clean and maintainable without typescript, it's even more impressive 🔥

Ответить
@tusharghildiyal6814
@tusharghildiyal6814 - 28.08.2023 20:22

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.

Ответить
@nmarcos3044
@nmarcos3044 - 28.08.2023 20:18

keep up 💪💪 bro.

Ответить
@rownokmahbub
@rownokmahbub - 28.08.2023 20:13

I don the front end of this website 😁

Ответить