Styled Components Full Tutorial - Style Your Components in React

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024
  • ReactJS Styled Components tutorial! In this video I will go over everything you need to know about the library! Styled-Components is a css library in react which allow you to style components very easily!
    -
    🚀 Learn ReactJS By Building 6 Projects: codedamn.com/l...
    💻 PedroTech Discord: / discord
    -
    Social
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Website: machadopedro.com
    Twitter: / pedrotech_
    Linkedin: / machadop1407
    Instagram: / _pedro.machado_
    Github: github.com/mac...
    Email: machadop1407@gmail.com
    Equipments I Use:
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    🌟 Algorithm Book To Pass Coding Interviews: amzn.to/2Z2CirS
    🌟 Microphone: amzn.to/2MKAm4V
    🌟 Keyboard: amzn.to/3tvU6ZR
    🌟 HD Webcam: amzn.to/3tMpJPD
    🌟 Room LED Lights: amzn.to/3a5mFGp
    Tags:
    - Styled-Components
    - ReactJS Tutorial
    - ReactJS
    #styledcomponents #tutorial #reacttutorial

Комментарии • 175

  • @MadBlissOff
    @MadBlissOff 2 года назад +2

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

  • @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 +

  • @bilalch898
    @bilalch898 3 года назад +37

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

  • @jaimemedina3351
    @jaimemedina3351 2 года назад +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 2 года назад +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

  • @mpilodlamini8407
    @mpilodlamini8407 2 года назад +2

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

  • @lottexy
    @lottexy Год назад +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

  • @yamilmsilva
    @yamilmsilva Год назад

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

  • @hellofriend3091
    @hellofriend3091 2 года назад +2

    This is what i was looking for thanks mate

  • @user-nf1ww4iq8g
    @user-nf1ww4iq8g Год назад

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

  • @revasseurborn2000
    @revasseurborn2000 2 года назад +1

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

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

  • @nicolasturek2413
    @nicolasturek2413 3 года назад +3

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

  • @jubjubfriend64
    @jubjubfriend64 2 года назад +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

  • @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

  • @sarahcalbez7104
    @sarahcalbez7104 2 года назад +1

    Seriously, thank you a lot for this video!

  • @jamesdaniel597
    @jamesdaniel597 2 года назад +1

    Nice rundown of styled components

  • @brandaoerick
    @brandaoerick 2 года назад

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

  • @limitless9483
    @limitless9483 2 года назад +1

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

  • @mikheilbeldishevski2776
    @mikheilbeldishevski2776 Год назад

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

  • @andarlin5312
    @andarlin5312 2 года назад +1

    Great video! Very informative!

  • @MrAndykofi
    @MrAndykofi 2 года назад +1

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

  • @caffeinated-pixels
    @caffeinated-pixels 3 года назад +1

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

  • @craigbarber3046
    @craigbarber3046 Год назад

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

  • @ayushdedhia25
    @ayushdedhia25 3 года назад +3

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

  • @pjguitar15
    @pjguitar15 3 года назад +1

    This makes code looks so clean

    • @PedroTechnologies
      @PedroTechnologies  3 года назад

      Yess! I absolutely love projects structured using styled components!

  • @zafarhussain8273
    @zafarhussain8273 3 года назад +1

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

  • @peshutanpavri1599
    @peshutanpavri1599 2 года назад +1

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

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

  • @musicmoi
    @musicmoi 3 года назад

    So happy I found this channel. 💓

  • @eliasimokhai
    @eliasimokhai 3 года назад +2

    You made it easy...thank you

  • @balazsbereczky595
    @balazsbereczky595 3 года назад +1

    it's a good summary, thanks!

  • @tsdineshjai8565
    @tsdineshjai8565 3 года назад

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

  • @benyaminyakobi3652
    @benyaminyakobi3652 2 года назад +1

    That's a pure gold knowledge!

  • @willvonarend
    @willvonarend 2 года назад +4

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

  • @thearong_5853
    @thearong_5853 3 года назад

    best video for beginner

  • @mahfuzulhasan3108
    @mahfuzulhasan3108 Год назад

    Explained very well, I appreciate it, keep it up

  • @varaprasad4163
    @varaprasad4163 3 года назад +4

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

  • @jordanmolina2351
    @jordanmolina2351 3 года назад +1

    really easy to understand and helpful thanks

  • @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 ;)

  • @petarstrbad7191
    @petarstrbad7191 3 года назад +1

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

  • @Anopeng
    @Anopeng 2 года назад

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

  • @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 :)

  • @danielfarkas2689
    @danielfarkas2689 3 года назад +1

    Clean and understandable! Thank you!

  • @cyriljephery2662
    @cyriljephery2662 Год назад

    Thank you so much... definitely subscribing

  • @voncedrickbriones3995
    @voncedrickbriones3995 2 года назад +1

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

  • @mayurghuge8846
    @mayurghuge8846 2 года назад +1

    Thank you.

  • @Deprecated446
    @Deprecated446 3 года назад +1

    Super helpful, thanks!

  • @ezbitz23
    @ezbitz23 2 года назад

    Thanks! Very useful content. Clear & concise.

  • @AntiPseudoPhilosopher
    @AntiPseudoPhilosopher 3 года назад +2

    Muito legal. Abriu muito a minha mente. Obrigado!

  • @psicotrogato
    @psicotrogato Год назад

    just clever as always.. thanks

  • @balanepalaiyathane9714
    @balanepalaiyathane9714 2 года назад +1

    Simple and very effective

  • @rustamov_vlogs
    @rustamov_vlogs 3 года назад +1

    Amazing as always, thank you 😊

  • @sonnix31
    @sonnix31 2 года назад +1

    Excellent.

  • @ThColinPereira
    @ThColinPereira 3 года назад +1

    Amazing video! It helped me a lot!!

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

  • @josephwong2832
    @josephwong2832 3 года назад

    great tutorial i subbed

  • @worldclasscode1847
    @worldclasscode1847 2 года назад

    Awesome! I also use this in every project :)

  • @stevenchung934
    @stevenchung934 3 года назад

    Super helpful, thanks man!

  • @johndoggett4657
    @johndoggett4657 2 года назад

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

  • @thevloglife105
    @thevloglife105 3 года назад +1

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

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

  • @yugsoni2603
    @yugsoni2603 3 года назад +1

    thank you so much.

  • @0xPanda1
    @0xPanda1 3 года назад

    very nice explanation , thank you very much

  • @nwabuzorchukwuemekaobiora7361
    @nwabuzorchukwuemekaobiora7361 3 года назад

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

  • @securitytechtalk
    @securitytechtalk 3 года назад

    thnx sir this tutorial is very useful for me

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

  • @karthikkhoday5555
    @karthikkhoday5555 3 года назад +2

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

  • @live_emulator
    @live_emulator Год назад

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

  • @sonamohialdin3376
    @sonamohialdin3376 2 года назад

    So good tutorial

  • @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

  • @indiedy_ghaze0968
    @indiedy_ghaze0968 2 года назад +2

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

    • @PedroTechnologies
      @PedroTechnologies  2 года назад +1

      You can use this for react native as well, so yes!

    • @indiedy_ghaze0968
      @indiedy_ghaze0968 2 года назад

      @@PedroTechnologies Thank you so much! Thank you!

  • @francescoPace27
    @francescoPace27 Год назад

    Ty very usefull!

  • @AbdulRehman-vj7xu
    @AbdulRehman-vj7xu Год назад

    nice bro good to help me

  • @nikoletahroncova3342
    @nikoletahroncova3342 3 года назад

    very good video, thank you very much for sharing!

  • @Ram-ry2sd
    @Ram-ry2sd 3 года назад

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

  • @rangabharath4253
    @rangabharath4253 3 года назад +1

    awesome as always :-)

  • @touseefahmad9794
    @touseefahmad9794 2 года назад +1

    which is better withStyles or Styled???

  • @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 Год назад

      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

  • @joicyjoy9658
    @joicyjoy9658 10 месяцев назад

    You rocked

  • @swiveiproduction9192
    @swiveiproduction9192 3 года назад +1

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

  • @irfanbaloch2884
    @irfanbaloch2884 2 года назад

    Awesome content

  • @CH3THIN
    @CH3THIN 3 года назад

    This is really good

  • @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: ruclips.net/video/o__czqXJtqk/видео.html

  • @samatzhussipov1139
    @samatzhussipov1139 3 года назад +1

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

    • @PedroTechnologies
      @PedroTechnologies  3 года назад +1

      Both are good, I like using styled components more!

  • @barca6097
    @barca6097 3 года назад

    Thanks a lot ❤

  • @briandacallos4234
    @briandacallos4234 2 года назад

    Definitely he has a blood of legendary bucky roberts.

  • @ampomahwinston3436
    @ampomahwinston3436 2 года назад

    How do you handle media query on styled component

  • @dleonardo8755
    @dleonardo8755 3 года назад

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

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 года назад +1

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

  • @leo-fv2nv
    @leo-fv2nv 3 года назад

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

  • @PB3073
    @PB3073 3 года назад +1

    Valeu!

  • @umerfarooq3121
    @umerfarooq3121 3 года назад +1

    Yeah Styled Components is awesome ;)

  • @User-em7fh
    @User-em7fh Год назад

    good tutorial 8.78/10

  • @divance
    @divance 3 года назад

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

  • @f3-faithfitnessfinance
    @f3-faithfitnessfinance 3 года назад +1

    6.66k subs🔥

  • @simple8810
    @simple8810 3 года назад

    Can we use Style components with react-bootstrap?