Live refactoring a subscribers React SPA anime application

  Рет қаралды 28,352

Web Dev Cody

Web Dev Cody

Күн бұрын

Пікірлер: 63
@arditgashi8850
@arditgashi8850 2 жыл бұрын
Stop excusing yourself for doing what you are doing. You are doing great, everything you've done in this refactor I would have done myself. Don't be so hard on yourself. Great video, keep them coming!
@WebDevCody
@WebDevCody 2 жыл бұрын
I often self doubt my abilities, but yes I agree, I need to just own it
@Sapphiamur
@Sapphiamur 2 жыл бұрын
These refactoring sessions are awesome to learn from, thank you so much!
@vaibhavgautam1999
@vaibhavgautam1999 2 жыл бұрын
This is really helpful for new programmers like me, it feels like a PR review. And lots of new insights
@Nodsaibot
@Nodsaibot 2 жыл бұрын
most of his fixes is stuff hes breaking lol
@vaibhavgautam1999
@vaibhavgautam1999 2 жыл бұрын
@@Nodsaibot doesn't matter for anyone is getting any value out of it
@ishakzehhaf864
@ishakzehhaf864 2 жыл бұрын
Dammmnn bro, you always make very helpful videos about coding and way of working. Keep up
@AnshumanKP
@AnshumanKP 2 жыл бұрын
Your videos are chill and informative, specially the live code refactoring streams. Love them!
@Manjaco
@Manjaco 2 жыл бұрын
I believe the problem was the missing “:” at 6:37 before the ${id}
@afaque.
@afaque. 2 жыл бұрын
At last someone experienced making a video
@3dninja54
@3dninja54 2 жыл бұрын
One thing I would say is to use lowercased words separated by hyphens for css classes. So instead of heroContainer, make it hero-container.
@saitech2452
@saitech2452 2 жыл бұрын
that doesnt work with react if they use module any idea how would you deal with that?
@madtin
@madtin 2 жыл бұрын
@@saitech2452 you would have use it like styles['hero-container'] in the jsx but It's pretty uggly so I prefer to use camelCase.
@saitech2452
@saitech2452 2 жыл бұрын
@@madtin ye same I just use camel case I'm still looking for improvements but so far nothing found
@bluerose2542
@bluerose2542 2 жыл бұрын
5:00 What if we have a nested route?
@BSimone95
@BSimone95 2 жыл бұрын
Love this type of content. I'm worse than you at coding, the only thing that came to my mind while you were refactoring is that it seemed that the random anime page was returning JSON detials for all the animes, which made the call to get the data again for individual anime seem a bit redundant. I think, in a perfect world, when opening the individual component I would've had something like an optional prop with data if I'm coming from the random anime page, if there is no prop then I make the request with the id.
@stanimirdimitrov4913
@stanimirdimitrov4913 2 жыл бұрын
4:56 - I'd say, make an array of objects, which would include the path and the element that you want to render. Then, you would simply map it in the return statement.
@stanimirdimitrov4913
@stanimirdimitrov4913 2 жыл бұрын
Love your content @Web Dev Junkie. I am a junior developer and most of the things that you say actually help me get better. Thank you!
@rmt0858
@rmt0858 2 жыл бұрын
I think mapping would take much time.
@qutibcodder
@qutibcodder 2 жыл бұрын
Great video bro!
@jordondax
@jordondax 2 жыл бұрын
Great video idea man, learning a ton.
@NguyenLam-vz9nb
@NguyenLam-vz9nb 2 жыл бұрын
Very useful hope you make more videos like this
@turkeymoonrover6830
@turkeymoonrover6830 2 жыл бұрын
React-router has GeneratePath method for generating paths with params . Better approach then GOTO usage.
@WebDevCody
@WebDevCody 2 жыл бұрын
Illl need to check that out thanks for sharing
@markangeloatienza7405
@markangeloatienza7405 2 жыл бұрын
Love to watch more of this kind of videos.
@lalithrockz
@lalithrockz 2 жыл бұрын
Ive been having this bug when I login it goes into a infinite loop. It should go to a home page but its not. If I manually go to the other routes then the whole app works fine.
@skeetplayz
@skeetplayz 2 жыл бұрын
Which VScode theme are you using?
@raygo44
@raygo44 2 жыл бұрын
There is a card component which has 4 props being passed into it. What I would do is to pass only one prop to it called "anime" and destructure what I need inside the component. Tho the reasoning behind different props is probably because there is a lot of data inside "anime" object which makes it pointless to pass entire anime object, but if that wasn't the case I would pass only 1 prop and destructure.
@WebDevCody
@WebDevCody 2 жыл бұрын
that works as well, one issue I have with that is if you anime card only need to display 4 things, but your Anime object has 30 properties, you don't want to expose all that extra data to your card object since that increases coupling between your anime object and UI card component.
@raygo44
@raygo44 2 жыл бұрын
@@WebDevCody Yeah I agree. That is basically what I said.
@WebDevCody
@WebDevCody 2 жыл бұрын
@@raygo44 nice ok we’re on the same page!
@omerfarooq7752
@omerfarooq7752 2 жыл бұрын
You can also set the base_url on axios instance itself by doing something like axios.defaults.baseURL = "YOUR_URL"';
@HarshPatel-uz4nm
@HarshPatel-uz4nm 2 жыл бұрын
What Xcode theme, with font and text color scheme are you using
@gusde9681
@gusde9681 2 жыл бұрын
what vscode theme did u use in this video?
@ГенаПетров-н5ы
@ГенаПетров-н5ы 2 жыл бұрын
export page slug from page component
@mmareplays4610
@mmareplays4610 2 жыл бұрын
Nice video man. What extension shows the errors while you code?
@ProbablyArth
@ProbablyArth 2 жыл бұрын
I love to watch videos like these
@sammorgan7143
@sammorgan7143 2 жыл бұрын
Warning: Hypthons in URLs are frowned upon in SEO Edit: ignore the above, it's only for domain names, rather than URLs.
@WebDevCody
@WebDevCody 2 жыл бұрын
The first google result says google recommends using hyphens since they are more human readable
@sammorgan7143
@sammorgan7143 2 жыл бұрын
@@WebDevCody ammended as it's only relevant for domain names.
@butwhothehellknows
@butwhothehellknows 2 жыл бұрын
Good job babe!!!!!
@christianwebb4748
@christianwebb4748 2 жыл бұрын
Maybe have 1 function for getAnimes/getAnime? Return all data if id is undefined?
@WebDevCody
@WebDevCody 2 жыл бұрын
That’s an option for sure
@_Rohit_Kumaar
@_Rohit_Kumaar 2 жыл бұрын
How you directly importing anything by pressing some key in vs code ? please share
@yaseru
@yaseru 2 жыл бұрын
install auto import extension on vscode, when you type something it autocompletes for you and then autoimports it.
@xiiEJRAM
@xiiEJRAM 2 жыл бұрын
I really love watch your videos and the way you think 🖤
@ESArnau
@ESArnau 2 жыл бұрын
What is better to render if u wanna display nothing. A react fragment or null?
@foxyl0l
@foxyl0l 2 жыл бұрын
the answer within the question
@markangeloatienza7405
@markangeloatienza7405 2 жыл бұрын
What vscode extension you are using to show live errors on set of coding ? thank you in advance!
@joansebastiancarrillobaron8014
@joansebastiancarrillobaron8014 2 жыл бұрын
Its name is Error Lens
@ninjaplavi
@ninjaplavi 2 жыл бұрын
How can we submit apps for these refactoring videos?
@WebDevCody
@WebDevCody 2 жыл бұрын
My discord
@vintage8
@vintage8 2 жыл бұрын
Could you share the extensions you use for React? Thanks
@vintage8
@vintage8 2 жыл бұрын
Did you heart my question without answering it? That's odd, no?
@fadoashura2867
@fadoashura2867 2 жыл бұрын
@@vintage8 I laughed.
@李鴻均-y6i
@李鴻均-y6i 2 жыл бұрын
Thanks!
@elmalleable
@elmalleable 2 жыл бұрын
if you dont have typescript in a project then you can use jsdoc comments to annotate the code and get better intellisense support, also add jsconfig to the project to get vscode to provide even better guard rails. to get jsconfing with little effort , try `npx jsconfig.json`, then confirm checkJS is true, you could also set that in vscode itself somewhere
@RaldinCasidar
@RaldinCasidar 2 жыл бұрын
The routing approach just makes it more complicated. But other than that, this is cool!
@WebDevCody
@WebDevCody 2 жыл бұрын
I would agree for this example, but on an application with 30 different endpoints, it makes it hard to refactor a url if everything is hard coded to point to that url, but yes maybe this approach isn’t the best 😅
@ThePirateHistory
@ThePirateHistory 2 жыл бұрын
For me, it’s better to come up with criteria for selecting projects, because this project in the video is full of ***, for example, the url should go through -, then don’t use the id, use the slug, because there weren’t such stupid movements as downloading absolutely all things that are not displayed, otherwise you will drown in shit, and you will constantly be asked to help and help. The type from the video needs to take some kind of course for beginners, where they will explain what to do, what to think, what to optimize, think about traffic, etc.
@WebDevCody
@WebDevCody 2 жыл бұрын
I didn’t really understand what you’re ranting about to be honest. Are you insulting my subscribers code because he is a beginner?
I loved solving this junior react interview challenge
26:02
Web Dev Cody
Рет қаралды 155 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Live refactoring a subscriber's React code
32:32
Web Dev Cody
Рет қаралды 117 М.
SUPER GRANDMASTERS TRY TO SOLVE OUR HARDEST PUZZLES!
10:27
Chess.com
Рет қаралды 245 М.
Is Next.js 15 any good? "use cache" API first look
8:16
Beyond Fireship
Рет қаралды 132 М.
The Biggest Mistake Intermediate React Developers Make
18:32
Cosden Solutions
Рет қаралды 42 М.
This is a good beginner React interview challenge question
30:38
Web Dev Cody
Рет қаралды 74 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 398 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН