Styled Components Full Tutorial - Style Your Components in React

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 175

  • @MadBlissOff
    @MadBlissOff 3 роки тому +2

    This is the first guy I've seen in my life with an imac and a mechanical keyboard.

  • @bilalch898
    @bilalch898 3 роки тому +37

    You deserve a million subs for sharing such a great knowledge ☺️

  • @chawker67
    @chawker67 3 роки тому +8

    This tutorial won that for me 🏆
    I had issues with most of the stuff you showed and now everything is perfectly clear. What's more you got me motivated so that's another +

  • @jaimemedina3351
    @jaimemedina3351 3 роки тому +2

    Nice job! FYI for anyone interested in what's going on under the hood, React is leveraging the Tagged Literals functionality of JavaScript.

  • @kalviyalkarpom4127
    @kalviyalkarpom4127 2 роки тому +2

    No around the bush, No waste of time, Just Did Perfect Job

  • @nirmalkoirala9660
    @nirmalkoirala9660 3 роки тому +6

    Hey Pedro!
    I am starting to learn react as a complete beginner and your video is helping me more than Udemy’s React course. Just finished the portfolio website following yours and now everything seems to make sense. Keep on doing awesome job. Keep the videos coming.
    Thanks million

  • @lottexy
    @lottexy 2 роки тому +1

    Amazing, so easy to understand! Tested this on typescript with a bit of googling to figure out the interface and all works great! Thanks pedro!

  • @Sezar_SZ
    @Sezar_SZ 2 роки тому +1

    This was the best video explaining how styled components work. THANK YOU!

  • @skyescrawford9774
    @skyescrawford9774 3 роки тому +1

    I'm so grateful because the first video that I see when first time I learn about styled components is yours video, thank you so much

  • @tech3425
    @tech3425 2 роки тому +7

    15:56 You dont actually need the '&' symbol over there to show nested components. This is a CSS preprocessor called Scss, and it will automatically detect that you have nested the label inside the button. '&' is for copying the parent class name once again, for selectors like :hover, and :active, which dont work without the parent class name.

  • @yamilmsilva
    @yamilmsilva Рік тому

    MAN !!!!! You made it look so easy and ABSOLUTELY UNDERSTANDABLE!!!
    Thank you so much. You are the best !!!

  • @mpilodlamini8407
    @mpilodlamini8407 2 роки тому +2

    Excellent tutorial. I am ready to and already applying styled components to my project.
    thank you very much

  • @nicolasturek2413
    @nicolasturek2413 3 роки тому +3

    explained very well, i appreciate you going through the small nuances and giving us reference examples!

  • @blueb06
    @blueb06 2 роки тому +1

    Thanks....man...this is what exactly I needed.....these days...you are like a savior in my react learning journey !

  • @maxmaksum4673
    @maxmaksum4673 3 роки тому +3

    it is the easiest and the most clear explanation of style component..thank you bro🙏🙏🙏

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Thank you very much! Glad you liked it!

    • @apexroots
      @apexroots 3 роки тому

      @@PedroTechnologies agree, thank you very much

  • @jubjubfriend64
    @jubjubfriend64 3 роки тому +1

    5:20 hahaha yes exactly what I was hoping for, just getting started with react and I was reluctant to use styled components due to it all being a string without auto-fill

  • @윤재희-m6k
    @윤재희-m6k 2 роки тому

    If i need some skill's how to use, Pedro always uploaded already. Your best guide I ever met

  • @jamesdaniel597
    @jamesdaniel597 2 роки тому +1

    Nice rundown of styled components

  • @brandaoerick
    @brandaoerick 2 роки тому

    I love the way you've approached this topic! Well done, bro!

  • @hellofriend3091
    @hellofriend3091 3 роки тому +2

    This is what i was looking for thanks mate

  • @craigbarber3046
    @craigbarber3046 2 роки тому

    & is called ampersand 😉 Literature major transitioning into tech. Great job! Thanks for posting. I'm collaborating with a friend and he asked me to use styled components instead of inline styling and now I feel like I can get started.

  • @royz_1
    @royz_1 3 роки тому +1

    Loved the video. But in case you didn't know, styled-components uses SCSS. that's how it's providing all these extra functionalities.

  • @joaohelio2925
    @joaohelio2925 2 роки тому +1

    How can I use the link with styled- Components?

    • @worldclasscode1847
      @worldclasscode1847 2 роки тому

      You can keep the tag, and put a styled div around it. My link. Then in the styled code you use the ".mytag" class selector to address the class and inject the CSS :)

  • @limitless9483
    @limitless9483 3 роки тому +1

    you can use that vscode plugin that help you rename your jsx tags

  • @sanvedbhoyar
    @sanvedbhoyar 2 роки тому

    at 20:20 the reason why you have to pass className as props might be because styled components generates random classNames for us when we style a component...
    So when you styled the Button component, you essentially styled element of html.. and styled component automatically generated a random className for when you created component...
    Which is why I think this might be the reason you have to de-structure className prop in Button component so we can apply the styles from random className generated by styled components. Hope this helps

    • @leg875
      @leg875 Рік тому

      I had the same query while watching the video. Thanks. Today I learned something new that after watching a video spend few mins to read through the youtube comments ;)

  • @caffeinated-pixels
    @caffeinated-pixels 3 роки тому +1

    Cheers dude, this is a great introduction to using styled-components. It's helped me a lot!

  • @sarahcalbez7104
    @sarahcalbez7104 2 роки тому +1

    Seriously, thank you a lot for this video!

  • @pjguitar15
    @pjguitar15 3 роки тому +1

    This makes code looks so clean

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Yess! I absolutely love projects structured using styled components!

  • @MrAndykofi
    @MrAndykofi 3 роки тому +1

    Nice, enjoyed your lectures please keep up with the good work.

  • @zafarhussain8273
    @zafarhussain8273 3 роки тому +1

    one of th best video on styeld comp. i realy appriciate your effort

  • @musicmoi
    @musicmoi 3 роки тому

    So happy I found this channel. 💓

  • @varaprasad4163
    @varaprasad4163 3 роки тому +4

    hey Pedro! could you please make a video on testing components? thanks.

  • @willvonarend
    @willvonarend 3 роки тому +4

    Hi, thanks for that. How would you approach using CSS variables with Styled Components? So having a '--primary-color' for example

  • @tsdineshjai8565
    @tsdineshjai8565 3 роки тому

    learnt a lot at first go with this tutorial. Kudos Man !

  • @andarlin5312
    @andarlin5312 2 роки тому +1

    Great video! Very informative!

  • @TheMyth2.9
    @TheMyth2.9 2 роки тому +1

    Hey great tutorial. What's your opinion on this vs emotion?

  • @ayushdedhia25
    @ayushdedhia25 3 роки тому +3

    So basically it follows the scss syntax to style our components... Right!? 😅😅

  • @Anopeng
    @Anopeng 2 роки тому

    It's the best explanation for me, thank you very much!

  • @benyaminyakobi3652
    @benyaminyakobi3652 3 роки тому +1

    That's a pure gold knowledge!

  • @mikheilbeldishevski2776
    @mikheilbeldishevski2776 Рік тому

    Thank you so much, you have answered so many questions I had. Thanks again.

  • @voncedrickbriones3995
    @voncedrickbriones3995 3 роки тому +1

    Why styled-components extension didn't work on my project? Can you help me how to fix that?

  • @mahfuzulhasan3108
    @mahfuzulhasan3108 2 роки тому

    Explained very well, I appreciate it, keep it up

  • @petarstrbad7191
    @petarstrbad7191 3 роки тому +1

    Awesome video, and most useful so far, thank you man! :D

  • @balazsbereczky595
    @balazsbereczky595 3 роки тому +1

    it's a good summary, thanks!

  • @antrahagure5372
    @antrahagure5372 Рік тому

    Thanks for video!
    Hiw to nest elopement in Styles ,like ul, li, a , hover ?
    In Sass nesting is easy but I couldn't understand how to do it with Stuled.

  • @eliasimokhai
    @eliasimokhai 3 роки тому +2

    You made it easy...thank you

  • @chaswards
    @chaswards 3 роки тому +3

    Great video! Very informative! How would you say styled components compares to using CSS modules?

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому +2

      Thank you! I prefer styled-components becaause i believe it makes it easier for large companies to divide the work (ux/ui make the components and the frontend devs just use them). But both ways work well!

    • @chaswards
      @chaswards 3 роки тому

      @@PedroTechnologies That makes sense, thanks!

  • @AntiPseudoPhilosopher
    @AntiPseudoPhilosopher 3 роки тому +2

    Muito legal. Abriu muito a minha mente. Obrigado!

  • @ezbitz23
    @ezbitz23 3 роки тому

    Thanks! Very useful content. Clear & concise.

  • @jordanmolina2351
    @jordanmolina2351 3 роки тому +1

    really easy to understand and helpful thanks

  • @danielfarkas2689
    @danielfarkas2689 3 роки тому +1

    Clean and understandable! Thank you!

  • @worldclasscode1847
    @worldclasscode1847 2 роки тому

    Awesome! I also use this in every project :)

  • @thevloglife105
    @thevloglife105 3 роки тому +1

    Very nice. But you need to upload video regarding node-sass scss compile to css.

  • @karthikkhoday5555
    @karthikkhoday5555 3 роки тому +2

    Can you tell me which extendion is used to show the file size next to import statements...

  • @johndoggett4657
    @johndoggett4657 3 роки тому

    Good tutorial man. Loved it. Some of the concepts remind me of Sass.

  • @thearong_5853
    @thearong_5853 3 роки тому

    best video for beginner

  • @Deprecated446
    @Deprecated446 3 роки тому +1

    Super helpful, thanks!

  • @indiedy_ghaze0968
    @indiedy_ghaze0968 3 роки тому +2

    Is this what I use for to syle my apps on andriod or ios?

  • @DaveTradeFx_01
    @DaveTradeFx_01 3 роки тому +2

    Can you make a video with data virtualization such as graph ... with react js

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      Yes I was already planning on a video on data visualization, so it will come out soon!

  • @rustamov_vlogs
    @rustamov_vlogs 3 роки тому +1

    Amazing as always, thank you 😊

  • @cyriljephery2662
    @cyriljephery2662 Рік тому

    Thank you so much... definitely subscribing

  • @ThColinPereira
    @ThColinPereira 3 роки тому +1

    Amazing video! It helped me a lot!!

  • @balanepalaiyathane9714
    @balanepalaiyathane9714 2 роки тому +1

    Simple and very effective

  • @sonnix31
    @sonnix31 2 роки тому +1

    Excellent.

  • @stevenchung934
    @stevenchung934 3 роки тому

    Super helpful, thanks man!

  • @live_emulator
    @live_emulator Рік тому

    im really curious how responsiveness can apply to styled components or media querys.

  • @mayurghuge8846
    @mayurghuge8846 3 роки тому +1

    Thank you.

  • @nwabuzorchukwuemekaobiora7361
    @nwabuzorchukwuemekaobiora7361 3 роки тому

    This was super helpful.... 🔥🔥🔥🔥

  • @0xPanda1
    @0xPanda1 3 роки тому

    very nice explanation , thank you very much

  • @touseefahmad9794
    @touseefahmad9794 3 роки тому +1

    which is better withStyles or Styled???

  • @Ram-ry2sd
    @Ram-ry2sd 3 роки тому

    Very nice! it's really simple! Thank you! But what about animations, media queries and browser prefixes?

  • @ampomahwinston3436
    @ampomahwinston3436 3 роки тому

    How do you handle media query on styled component

  • @ashishthapa7768
    @ashishthapa7768 3 роки тому +1

    Well I watched your login with session video but i am getting issue on redirecting to profile dashboard so...I wish u will make solution on redirecting to profile dashboard after login much appreciate till yet.Thank You:-)

    • @PedroTechnologies
      @PedroTechnologies  3 роки тому

      In react you can have a promise after the fetch request and use the useHistory hook in react router dom to redirect. I have a video explaining this: ua-cam.com/video/o__czqXJtqk/v-deo.html

  • @trered21
    @trered21 Рік тому

    mine doesnt work help please. its not reading any of my commands from styled. it also doesnt auto fill elements so im assuming my package is bad but it is definitely installed

  • @nikoletahroncova3342
    @nikoletahroncova3342 3 роки тому

    very good video, thank you very much for sharing!

  • @Angels2welcome
    @Angels2welcome 2 роки тому

    I loved the video you are such a good teacher! Can you make a video explaining how can I import fonts and use it in styled componets?

    • @jpcc1223
      @jpcc1223 2 роки тому

      to use it, you need to import the font you want into your index.html file. After importing (for example, from google fonts), you can use it anywhere in you app

  • @umerfarooq3121
    @umerfarooq3121 3 роки тому +1

    Yeah Styled Components is awesome ;)

  • @securitytechtalk
    @securitytechtalk 3 роки тому

    thnx sir this tutorial is very useful for me

  • @josephwong2832
    @josephwong2832 3 роки тому

    great tutorial i subbed

  • @rangabharath4253
    @rangabharath4253 3 роки тому +1

    awesome as always :-)

  • @jakkenfive
    @jakkenfive 3 роки тому +1

    Great video, Pedro how old are you?

  • @divance
    @divance 3 роки тому

    Anyone here can tell what plugin is using to show the size of the npm package ?

  • @dleonardo8755
    @dleonardo8755 3 роки тому

    first line in 10:43 what is the green text? how i can see this in my code

  • @swiveiproduction9192
    @swiveiproduction9192 3 роки тому +1

    would you recommend us to use styled components or CSS modules?

  • @Sameer.Trivedi
    @Sameer.Trivedi Рік тому +1

    20:42 I was once pulling out my hair for that exact thing why do we even need the className gosh, its just to waste devs' time.

  • @macos-brasil1814
    @macos-brasil1814 3 роки тому +1

    Styled Component is the way people complicates styles using javascript instead of just understand how to make good CSS structures.

  • @simple8810
    @simple8810 3 роки тому

    Can we use Style components with react-bootstrap?

  • @briandacallos4234
    @briandacallos4234 2 роки тому

    Definitely he has a blood of legendary bucky roberts.

  • @samatzhussipov1139
    @samatzhussipov1139 3 роки тому +1

    css in js or css modules which need choose for reactjs ?

  • @mohamedyoussef8835
    @mohamedyoussef8835 3 роки тому +1

    Awesome ++++++++++++++ 🙂🙂

  • @CH3THIN
    @CH3THIN 3 роки тому

    This is really good

  • @leo-fv2nv
    @leo-fv2nv 3 роки тому

    can u share code that could b more helpful and it saves time.......i am happy with ur teaching.

  • @yugsoni2603
    @yugsoni2603 3 роки тому +1

    thank you so much.

  • @sonamohialdin3376
    @sonamohialdin3376 2 роки тому

    So good tutorial

  • @PB72UK
    @PB72UK 2 роки тому +1

    Nice

  • @irfanbaloch2884
    @irfanbaloch2884 3 роки тому

    Awesome content

  • @barca6097
    @barca6097 3 роки тому

    Thanks a lot ❤

  • @akashshrestha01
    @akashshrestha01 3 роки тому

    why my vscode is not suggesting css code completions?

  • @joicyjoy9658
    @joicyjoy9658 Рік тому

    You rocked

  • @AbdulRehman-vj7xu
    @AbdulRehman-vj7xu Рік тому

    nice bro good to help me