How to Style your React App (5 Different Methods Compared)

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 59

  • @coldcircuit99
    @coldcircuit99 3 ปีที่แล้ว +14

    When sass perfectly solved almost all css problems and people still try to reinvent the wheel.

  • @KDHRproductions
    @KDHRproductions 2 ปีที่แล้ว +2

    I washing trouble deciding how to style my react app and this was a very comprehensive video explaining my options! Thank you!

  • @rachada2532
    @rachada2532 3 ปีที่แล้ว +9

    Love Tailwind and Styled Components

  • @JustusKimtai
    @JustusKimtai 15 วันที่ผ่านมา

    Great tutorial. Bravo!

  • @Nellak2011
    @Nellak2011 3 ปีที่แล้ว +5

    I tried Material UI and didn't like how locked down it was. I then tried Styled components and fell in love!!

  • @ihtasham9237
    @ihtasham9237 2 ปีที่แล้ว +1

    thanks dude, I really like this video because it gives you an overview of everything allowing you to make a more informed decision of what to learn next :)

  • @big_sam6350
    @big_sam6350 9 หลายเดือนก่อน

    Thanks bro. This video was extremely helpful

  • @boo5274
    @boo5274 3 ปีที่แล้ว +1

    I had no idea styled components was a thing. And now my life is changed.

    • @EricMurphyxyz
      @EricMurphyxyz  3 ปีที่แล้ว +1

      It's pretty awesome

    • @clublati
      @clublati 2 ปีที่แล้ว

      The author fails to mention the cons of styled components which are several - if you work in large performant sites it's not really an option. Look up how styled components are actually rendered in the web page.

    • @clublati
      @clublati 2 ปีที่แล้ว

      I stand corrected - he did mention it in min 11

  • @YousifAtique
    @YousifAtique 2 ปีที่แล้ว +3

    Much appreciate your help in making me understand modern day CSS comparatively. No doubt, modern day styling and tooling around it overwhelm backend developers. Pretty well explained!
    (BTW, subscribed and liked)

  • @reallyfunnyanimations5949
    @reallyfunnyanimations5949 ปีที่แล้ว

    super helpful thank you

  • @dennisdecoene
    @dennisdecoene 3 ปีที่แล้ว +1

    What if I'm a developer with zero design feeling. I want to let a designer style my app. He's an HTML/CSS wizard. But knows squat about JS/react. The designer would have a hard time with this approach right? I'm more a fan of separation of concerns.

  • @dawid2137pl
    @dawid2137pl 3 ปีที่แล้ว +1

    What's your current way to go? Right now I'm writing my CSS using Styled Components but I'm wondering if I shouldn't move on to Linaria. What's your opinion about it?

    • @Euquila
      @Euquila 3 ปีที่แล้ว

      for building web apps, i prefer css in js like emotion or sc

  • @shubhamshekhar23
    @shubhamshekhar23 2 ปีที่แล้ว

    Thank you so much for this video.. :)

  • @sinanyaman2007
    @sinanyaman2007 4 ปีที่แล้ว +3

    Great comparison and clarification! Thanks

  • @NoelTorres_noletorious
    @NoelTorres_noletorious 2 ปีที่แล้ว

    Didn't know about twin.macro, pretty much solves what I was looking for. Thanks!

  • @DannyAwad
    @DannyAwad 3 ปีที่แล้ว

    Thanks that was a great video, it's really helpful.

    • @EricMurphyxyz
      @EricMurphyxyz  3 ปีที่แล้ว

      Thanks, glad you found it helpful!

    • @DannyAwad
      @DannyAwad 3 ปีที่แล้ว

      I'm just starting out a career in web dev I already have learn the MERN Stack and now I in the middle of building a project, I mostly finished the Nodejs server, now I found your TH-cam video I have build a react apps before, but I was looking for a faster way to build the ui, and I need some eyes on code, so can you be my mentor?

  • @devhijleh8776
    @devhijleh8776 3 ปีที่แล้ว

    Really good info. Thank you!

  • @mohamedyoussef8835
    @mohamedyoussef8835 3 ปีที่แล้ว

    Please show how to setup and use Linaria... no resources at all on TH-cam

  • @TheNamesJT
    @TheNamesJT 3 ปีที่แล้ว

    So styled components and linaria? does linaria work with create-react-app?

  • @mohamedyoussef8835
    @mohamedyoussef8835 3 ปีที่แล้ว

    Super Awesome Tutorial ++++++++++ Thank you 🙂🙂

  • @TheMikhaylov
    @TheMikhaylov 4 ปีที่แล้ว +1

    We used to use module SCSS. What do you think about it?

    • @EricMurphyxyz
      @EricMurphyxyz  4 ปีที่แล้ว +3

      SCSS is good, probably should have mentioned it in the video! Works great with CSS modules

    • @TheMikhaylov
      @TheMikhaylov 4 ปีที่แล้ว

      @@EricMurphyxyz killer feature ;))

  • @woozy_deer
    @woozy_deer 3 ปีที่แล้ว

    TailwindCSS (at least from v2.0) incorporates postCSS by default, isn't that accomplishing the same thing as what linaria offers?

  • @jonathancaldwell517
    @jonathancaldwell517 3 ปีที่แล้ว +2

    It was hard to catch what you were actually doing in some parts of the video (like how you were implementing tailwind within the app)... also, practice removing 'umm' and 'but' from your delivery (i'm horrible at that myself) and speak with more confidence (you know what your doing, but your vocals say otherwise)... Thx for the post!

    • @EricMurphyxyz
      @EricMurphyxyz  3 ปีที่แล้ว +2

      Thanks! I think in my new videos I'm a bit clearer and use less umms, it's a bad habit for sure

  • @kareemsalem7950
    @kareemsalem7950 2 ปีที่แล้ว

    bros the goat

  • @Kiki-ez3ow
    @Kiki-ez3ow 2 ปีที่แล้ว

    Hey murphy, i really like the background you used for vscode, can you give me a name of a theme?

  • @Atif1702
    @Atif1702 3 ปีที่แล้ว +1

    Thank you so much for this video. Great content
    Please correct me if I didn't gather it correctly about Linaria and Complied:
    Compiled and Linaria take ALL the CSS out from ALL the JS files and make it ONE GIANT CSS file at BUILD TIME. Later on at RUNTIME, EACH component ONLY imports the CSS from that ONE GIANT file, that that PARTICULAR component is using.
    Is this correct?

    • @EricMurphyxyz
      @EricMurphyxyz  3 ปีที่แล้ว +3

      Yes, that's how it works. It's been a while since I used it, so I'm not sure if it builds the CSS into one giant file or serveral files at build time, but you can look into the build folder and see for yourself.

    • @Atif1702
      @Atif1702 3 ปีที่แล้ว

      @@EricMurphyxyz Thank you so much Eric. What would you suggest is best of all for React styling? Linaria, Styled Components, Tailwind or some other library?

    • @EricMurphyxyz
      @EricMurphyxyz  3 ปีที่แล้ว +3

      @@Atif1702 Personally I like styled-components the best

    • @Atif1702
      @Atif1702 3 ปีที่แล้ว

      @@EricMurphyxyz Thanks man 😉

  • @mohdyasir2515
    @mohdyasir2515 2 ปีที่แล้ว

    thank you so much

  • @heatvisuals
    @heatvisuals 3 ปีที่แล้ว

    Excellent tutorial sir. Very very clean and understandable

  • @mickeymoses8688
    @mickeymoses8688 3 ปีที่แล้ว

    what is the name of your vs theme

  • @SMK1455
    @SMK1455 3 ปีที่แล้ว

    Thanks!

  • @cyrusgracias4556
    @cyrusgracias4556 4 ปีที่แล้ว +2

    IMO styled components are more maintable
    That Tailwind with styled components was really cool
    Not sure whether maintainable though

    • @EricMurphyxyz
      @EricMurphyxyz  4 ปีที่แล้ว

      I agree, would not personally use the tailwind with styled components, but cool to have it as an option

    • @hugodsa89
      @hugodsa89 3 ปีที่แล้ว +8

      tailwind is basically going back to bootstrap days yuck

    • @thanhnguyenhoai2727
      @thanhnguyenhoai2727 3 ปีที่แล้ว +1

      @@hugodsa89 its better imo

    • @deanolium
      @deanolium 2 ปีที่แล้ว

      @@hugodsa89 The key with Tailwind is to define the various values in a central location. The whole point is that it helps keeps things consistent across your site. So say your main brand color is teal. With normal Styled Components, you would have a load of components across the board with various bits being in Teal. Now your marketing manager decides that the brand color is now going to be gold. You now have to go through each component to change the teal over. But what if it's just certain parts which are to be gold, and some of the teal is going to stay? This adds to the cognitive load to update the site, as you need to figure out the role of each component. Mistakes can easily happen here.
      With Tailwind, you define the colors in one file, giving them a name which says what their role is. So maybe `primary-brand-500` and `secondary-brand-500`. Perhaps both of these are teal in the first example, and so your components are then just using this color. Then when marketing decides you're going gold, you just change `primary-brand-500` to gold, but keep `secondary-brand-500` as teal. Job is now done and no mistakes are made.
      Tailwind can become messy and unmaintainable, absolutely. But this usually suggests that either you're not pulling out the standards into a base file, or you aren't breaking the site up into atomic components.

    • @hugodsa89
      @hugodsa89 2 ปีที่แล้ว +1

      @@deanolium or you could use css variables with styles components, fixed

  • @imyfamilyev
    @imyfamilyev 2 ปีที่แล้ว

    You're funny

  • @faris.abuali
    @faris.abuali 2 ปีที่แล้ว +2

    Excellent tutorial sir. Very very clean and understandable