React Styled Components (Next Level CSS?)

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

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

  • @TheLollercaster
    @TheLollercaster 3 года назад +5

    ahhh so there is an extension for vscode-styled-components!!!! I had a feeling it must be an extension problem! thanks a million!!!

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

    Best styled-components tutorial I've come across, to date. Easy to understand and learn through examples. Great job.

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

    A VERY NICE tutorial 👍🏻
    You are able to wrap a lot of things about styled component in just 18 minuts 👌🏻

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

    Great video, thanks man! I have been using Tailwind with my latest React project. I'm not sure that it's actually that good. It works well, but having to put a lot of classes in makes the components look quite messy. I think it might be increasing my bundle size too.

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

      i guess it's pretty off topic but do anybody know a good place to stream newly released tv shows online?

  • @kishanthshanthakumar7637
    @kishanthshanthakumar7637 5 лет назад

    In my current project i was confused a lot. But your single video made me super cool.. thanks a lot.

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

    Introduction to Styled components - 0:00
    With the Example - 2:08
    Useful Extension - 4:37
    Dynamic Controlling - 7:43
    Global sharing Aka Theme -9:06

  • @herbertk9266
    @herbertk9266 5 лет назад +1

    Thks for sharing am using them already they are so powerful

  • @H1L1CH
    @H1L1CH 4 года назад

    Helpful video! You convinced me to start using Styled Components! Also clear examples and explanation. Thank you!

  • @gokulambalavanan3592
    @gokulambalavanan3592 4 года назад +6

    the tutorial was really helpful.. i wish you do some contents on react-spring library

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

    this was excellent, thank you!

  • @12px
    @12px 5 лет назад +3

    You nailed it. Thanks!

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

    I'd love to check out how we can implement dark mode with Styled components, I've done it with Material UI once, wanna checkout the alternatives tho, since I don't just want to use MUI for every little project I make.

  • @vinaykashyap6363
    @vinaykashyap6363 4 года назад

    Thank you for the explanation. Great video!

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

    Very Helpful Video!

  • @Classsed
    @Classsed  5 лет назад +35

    14:02 The ultimate brain fart haha

  • @markclynch
    @markclynch 5 лет назад +1

    Great Video! Would love to see more Styled Components!!!

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

    Great tutorial, thank you so much for your sharing.

  • @krishcm3016
    @krishcm3016 4 года назад

    Wow! Thanks for the video! 🙌🏻🙌🏻😄

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

    thanks so much

    • @Classsed
      @Classsed  4 года назад

      You're welcome bro!

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

    the rhyming was on point

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

      What rhymes ? :D

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

    Really awesome 👍

  • @MrFreddehboy
    @MrFreddehboy 5 лет назад

    I have use generall css until now, I will use Styled Components from now :)
    SC seams very easy using :)

  • @peoplescuriosity
    @peoplescuriosity 4 года назад

    Great Tutorial. Thanks for sharing.

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

    Amazing !!!😍

  • @aurangzaibmanzoor1136
    @aurangzaibmanzoor1136 4 года назад +1

    Hello, Tell me that how can we use media queries in styled-components.

  • @YeisonDev
    @YeisonDev 5 лет назад

    Thanks for the video bro, i need this video for resolve my project with react, thanks

  • @PraveenSaraogi360
    @PraveenSaraogi360 5 лет назад +1

    what vscode theme you using ?

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 5 лет назад +1

    Thank u for this awesome video

  • @ketankshukla
    @ketankshukla 4 года назад

    Helpful video. Thanks!

  • @soumiahm7318
    @soumiahm7318 5 лет назад

    Awesome tutorial, thank you

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

    Thanks for this awesome tutorial
    One question, styled components its normally used replacing completely css files or is It more like a complement? I mean would we have to write some traditional css still?

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

      I am going to answer this question, just in case you are still figuring it out.
      So, in terms of styling your component, you can just ignore traditional css and apply styled-components instead. However though, there is nothing wrong to use CSS at the same time. For example, i practically designi this hero section using styled components, but when it comes to global styling, i use css to import color variables, h1 and such, along with the body margin.

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

    question for friends,
    do you find styled components really useful?
    i mean it looks ok at first glance,
    but also doesn't look like huge improve to ordinary work with css.

  • @adelaaji
    @adelaaji 5 лет назад +1

    Thank you, Great tutorial :)

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

    Really helpful..!

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

    really great

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

    Teal is a thing! Makes me laugh

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

    thank you excellent tutorial

  • @reactstuffreact4500
    @reactstuffreact4500 5 лет назад

    thanks a lot for the video, i wish you would of covered the import of the actual fonts also. or did you have them installed locally already?

  • @codingworld6762
    @codingworld6762 4 года назад

    Thanks bro,very good tutorials

  • @shahidullahmiazi
    @shahidullahmiazi 5 лет назад

    All example are "Button"! So, how I able to using another CSS styling? I've need jQuery, Grid, Row, Col everything for design my web page. I have little knowledge of ReactJS but can't proceed when I using jQuery in my navigation menu display 'block'. Please, give me way for solving this issue.

  • @marcellciszekdruzynski
    @marcellciszekdruzynski 5 лет назад

    Thanks once again, great videos!

  • @alexon2010
    @alexon2010 4 года назад

    as I would with REACT + NEXT + STYLED-COMPONENT to put a css background image
    how I use this css with next -> backound-image> url ('........')

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

    Please what is the extension you are using to show the import size

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

      Import Cost

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

      @@Classsed Thank you so much, also a nice video really.

  • @Fit_With_Mahesh_D
    @Fit_With_Mahesh_D 4 года назад

    Thank You..✌✌

  • @charlypineapple5514
    @charlypineapple5514 4 года назад

    loved it!

  • @damian5188
    @damian5188 4 года назад

    Thanks bro, that's quite a nice video. Also good english:) Cheers

  • @AbhishekNigam
    @AbhishekNigam 5 лет назад

    Excellent tutorial!

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

    why i cant use &:hover {} in my project will I have to download any library?

  • @parasarora5869
    @parasarora5869 5 лет назад

    amazing video !! 👍👍👍

  • @lookintomyeyes2681
    @lookintomyeyes2681 4 года назад

    this video was helpful af :)

  • @treicyvasconcellos
    @treicyvasconcellos 4 года назад

    Thank you!

  • @mohammadfouad6706
    @mohammadfouad6706 4 года назад

    Thanks Man :D

  • @c3ltic1
    @c3ltic1 5 лет назад +1

    @Classed what if i want in a Button component with 3 classes let's say we add danger i canot use ternary for that how would you do it ? Only with themes ?Thanks :)

    • @c3ltic1
      @c3ltic1 5 лет назад +1

      There is a more elegant way ? I Would do like this :
      ${props => props.primary && css`
      background-color: red;
      color: #fff;
      border:none;
      `}
      ${props => props.secondary && css`
      background-color: orange;
      color: #fff;
      border:1px solid #000;
      `}
      ${props => props.disabled && css`
      background-color: blue;
      color: #fff;
      border:1px solid #000;
      `}

    • @ikaiyanasaki4198
      @ikaiyanasaki4198 5 лет назад

      Look at the code below, i did it like this in one of my projects, You can store your unique styles in variables and then create a function with the control flow of your choice and then include that function in your component.
      import styled, { css } from 'styled-components';
      const buttonStyles = css`
      base styles
      `;
      const propOneStyles = css`
      styles
      `;
      const propTwoStyles = css`
      styles
      `;
      const getButtonStyles = props => {
      if (props.propOne) {
      return propOneStyles;
      }
      return props.propTwo ? propTwoStyles : buttonStyles;
      };
      export const ButtonContainer = styled.button`
      styles
      ${getButtonStyles}
      `;

  • @awekeningbro1207
    @awekeningbro1207 5 лет назад +1

    How to get that gzipped info alongside your library imports?

    • @Amir-ku5lp
      @Amir-ku5lp 4 года назад

      You should install import cost extension in vscode
      You probably know by now because you asked ten months ago 😂😂

  • @srttkx
    @srttkx 5 лет назад

    Thanks 🙏

  • @LumbreraEnMiCamino
    @LumbreraEnMiCamino 4 года назад

    what theme are you using?

  • @resolutionAgha
    @resolutionAgha 5 лет назад

    Thanks for the video! Would love to see more Styled Components.
    what about the Grid ?
    i use bootstrap grid system, is there any solution in Styled Components?

    • @filcondrat
      @filcondrat 5 лет назад +1

      i guess you can use built-in css grid

  • @mustufazaki3438
    @mustufazaki3438 4 года назад

    what is the extension name that is showing modules size when you import any module ?

    • @Classsed
      @Classsed  4 года назад

      Import cost by wix

  • @TimCluyts
    @TimCluyts 5 лет назад

    Quick question: how do you get the rebuild done on save?

    • @StockDC2
      @StockDC2 5 лет назад +1

      If you're using create-react-app, just start up the server by typing "npm start" into your terminal. Now any changes to your files will automatically cause the server to restart to show the latest changes.

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

    tx u

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

    love you

  • @s1n7ax
    @s1n7ax 5 лет назад

    Awesome

  • @amitsaini000
    @amitsaini000 4 года назад

    great

  • @salvadoremmanuelkain
    @salvadoremmanuelkain 5 лет назад

    great I like it

  • @ganesanc8467
    @ganesanc8467 4 года назад

    how to style non tags

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

    Succint Great video

  • @НикитаКальнов-л8ш
    @НикитаКальнов-л8ш 5 лет назад

    Where are you from? Just an interest because of your English spelling :)

    • @micoberss5579
      @micoberss5579 5 лет назад +1

      С Англии он. И зовут его Ахмед

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

    Never understood why people like this library. I mean, it's so easier to create a project and use SCSS which already has variables, mixins, imports. SCSS with components it's easier to maintain and reuse. Styled Components make the project so confusing and you constantly has to keep tracking of the "tag/components" names besides you have to download more plugins to handle the scss because styled components css definition is inside a string so your code editor gotta have something extra in order to syntax your "string/css" code.

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

      I understand where you're coming from, but using SCSS requires you to come up with a more complex set of names and have to worry about using them in the correct scope, using styled components lets developers that are working on separate parts of the app not have to worry about the entire styles but just on the part that they're working on, they both have pros and cons and I wouldnt say one is better than the other, it's again the 'boring' answer of 'it depends on the project'

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

      ​@@Classsed Well, actually not... Using React you have right from the gecko the "module.css" which means that you can create lots of classes in your CSS/SCSS file and not having to worry about naming because modules will create random names for you. So you can create a naming pattern for a single component and reuse the same name (if you want or by mistake) and when Webpack compile your product you can see that all the classes will be like "Navigation_nav_2Wpj".
      To me, styled component is just better than styling inside tags which is awful. But split the code between pages and different languages is so much better for me.
      I'm not saying that people shouldn't use Styled Components, i'm just saying that i still don't see this "huge advantage" of using this unless in very specifically cases and even then i still thing people should use CSS always separated from the JSX file.

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

      Fair enough, CSS modules are cool and all but dont forget when you have standard components that you need in diffrent parts of your app (e.g. buttons, cards... etc) you can use CSS modules for those to keep the CSS scoped then every one of those will require 2 files instead of one, but to be frank, I myself dont use styled components almost at all, mostly utility libs like Tailwind and Karma or SCSS when I need it to be fully custom, but I know a bunch of devs that I respect who do so I guess it's matter of taste, at the end of the day there is million way to get the job done and everything has a tradeoff

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

      ​@@Classsed Yeah, definitely there's no "right/wrong way" because it depends of the projects, workflows and people dealing with integrations. At the end of the day the best solution is what works for the people doing the job faster and easier as possible.
      If the dev doesn't know what he's doing, it will be a mess anyway rs

  • @g-luu
    @g-luu 5 лет назад +2

    Gay Intro... nice video though