Full React Tutorial #6 - Adding Styles

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Hey gang, in this React tutorial we'll see how to add CSS to our React projects.
    🐱‍💻 🐱‍💻 Course Files:
    + github.com/iam...
    🐱‍👤🐱‍👤 JOIN THE GANG -
    / @netninja
    🐱‍💻 🐱‍💻 My Udemy Courses:
    + Modern JavaScript - www.thenetninj...
    + Vue JS & Firebase - www.thenetninj...
    + D3.js & Firebase - www.thenetninj...
    🐱‍💻 🐱‍💻 Helpful Links:
    + HTML & CSS Course - • HTML & CSS Crash Cours...
    + Modern JavaScript course - • Modern JavaScript Tuto...
    + Get VS Code - code.visualstu...
    🐱‍💻 🐱‍💻 Social Links:
    Facebook - / thenetninjauk
    Twitter - / thenetninjauk
    Instagram - / thenetninja

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

  • @kokothakoala
    @kokothakoala 2 года назад +68

    The way you break things down shows you have a fantastic ability to understand teaching from the perspective of the people you teach. The way you do it with react has shown me things I couldn’t understand from so many more videos! Thank you!

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

      I totally agree he seems to know the exact questions that are forming in my mind and answers them with perfect clarity.

  • @robinsonzapata1
    @robinsonzapata1 Год назад +6

    The fact that you re-created a series of videos to make sure the videos are up-to-date with the language is brilliant! there are soo many tutorials out there out of date. This is what I need it some update on react! You teaching style is unique very well explain. Really appreciate your video tutorials.

    • @NetNinja
      @NetNinja  Год назад +1

      Thanks for the kind words :)

  • @DemonBury
    @DemonBury Год назад +10

    after watching this ill be honest.....its absolute brilliance, i had a hard time understanding everything for js but learning now that you can do it this way through react just make everything easier for me to read and understand, im currently in a course who sometimes go way to fast but this is just great loving the series so far keep it up, i also subbed ;)

    • @NetNinja
      @NetNinja  Год назад +2

      Thanks Demon, much appreciated :)

  • @clevelandforde6570
    @clevelandforde6570 2 года назад +5

    Shaun, your simplicity of teaching is brilliant - you are close to the Tao, thank you. Additionally, we appreciate the gang asking valid questions, and more importantly, we are thankful for the informed answers from the senior gang

  • @thenexuscowboy9491
    @thenexuscowboy9491 3 года назад +14

    You're a fantastic teacher.

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

    Excellent video Net Ninja, I noticed most who create tutorials never really touch CSS, they always plugin boot strap for their styles. I am really impressed with your level of CSS. Months ago, I learned the fundamentals of CSS from one other channel but once I took your CSS course, I learned the most. Back then I had a hard time understanding the class and id for CSS, but you made it so simple I learned very quickly, thanks for your content.
    Do you have a course on grid?

  • @patientlearning9303
    @patientlearning9303 21 день назад

    1) The App.css, styles not only the App.js component but every component placed in the app.js

  • @davidho1258
    @davidho1258 3 года назад +14

    Better to do this instead of inline styling.
    Const styles = { /* style go here */ }
    ...

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

      writing css rules in object notation is unnatural.

  • @ichiroutakashima4503
    @ichiroutakashima4503 Год назад +1

    I learned a lot about this, thanks to you. I wouldn't mind buying this course on Udemy. Hopefully you make one.
    Your explanations are really easy to digest.

    • @NetNinja
      @NetNinja  Год назад +1

      Thank you for your kind words and support Ichirou :) you can find more courses over at NetNinja.dev

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

    Brilliant tutorials! ❤‍🔥You are a great teacher! Thank you!!

  • @toonice555
    @toonice555 9 месяцев назад

    Didn't know that the inside curly braces for the style was a JS Object. Now it makes way more sense

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

    Great React tutorials. Thank you!

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

    these videos are really helping me! thx for the contribution

  • @kutchigamer007
    @kutchigamer007 3 месяца назад

    your video is help full thank you bro ❤

    • @NetNinja
      @NetNinja  3 месяца назад

      No probs! Glad to hear it's helpful :) thanks for watching

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

    Best teacher ever

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

    Very well explained. Thank you!

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

    Very pretty style. I love it. And your train. Thanks

  • @Monique-pe3zf
    @Monique-pe3zf 3 года назад

    Fantastic teaching style i can learn all now

  • @ohmegatech666
    @ohmegatech666 Год назад +2

    What's the point of making index.css if App.css is already a global CSS file? Don't they do exactly the same thing? In React, any CSS file imported to any component will get bundled in the end into the single HTML file so they will all join the same global namespace

    • @farazk9729
      @farazk9729 4 месяца назад

      Hi! Did you find the answer to your question? I have the same question.

    • @TheAcebyte
      @TheAcebyte Месяц назад

      I'm just a beginner but I guess when writing CSS wouldn't you want separate style files for your separate components? I guess it just makes everything more readable and easier to work with

  • @phantomapprentice6749
    @phantomapprentice6749 5 месяцев назад

    Thanks dude.

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

    thanks for your courses..

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

    Hello Ninja Master, there's a problem. My index.js is not reflecting the index.css styling. Why is that?

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

    Hey, great lessons so far! Just wanted to ask at 5:16 you said objects and in earlier ones you said it doesnt take objects, but it takes arrays. So it accepts also objects in the end?

  • @abishek1997
    @abishek1997 3 года назад +6

    pls pls pls/... do a STYLED COMPONENTS course pls.

  • @dr.asimali4263
    @dr.asimali4263 3 года назад +5

    Can you make a new series on Django PLEASE!

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

      Yeah I like his style of teaching.

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

      There's a playlist by Corey Schafer

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

      Yes please do!

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

    great video man

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

    Thanks for these new videos!

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

    Thank you sir, helpful

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

    you my man. are awesome.

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

    hello sorry cant find the (@import URL) any help please?

  • @Aman-Verma
    @Aman-Verma 3 года назад +1

    please do a video on protected routes 🙏

  • @user-tg3xw2qf3m
    @user-tg3xw2qf3m 2 года назад +1

    Could you please help me 😞i can't find the link URL from Google font can you send it here

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

    Thank you.

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

    Awesome!! 😇

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

    Couldn’t get your git repo css codes

  • @MrGunkbram
    @MrGunkbram 2 месяца назад

    Can we use bootstrap to styling?

  • @development8735
    @development8735 8 месяцев назад

    actually when we inspect the page at that time we are getting index.css page codes sir not app.css page can you please explain me this why it is so ?

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

    why i have to do 'npm start' in the terminal everytime to get the live server after deleting something that you said don't required for this tutorial from the dojo-folder ?

  • @emre-ergin
    @emre-ergin 2 года назад +1

    This is really useful thanks a lot.
    I am also coding along with you to fully grasp the content. At 4:28, I had Homepage centered while you don't. Checked all of my code line by line to see any difference between the code in repo, and did not find anything. In index.css, .content class is assigned margin: 40px auto, which should make the heading centered.
    What am I getting wrong?

    • @ccpowerhour7607
      @ccpowerhour7607 Год назад +3

      I know it's an old comment, but I had the same problem and wanted to add this in case someone else had it. I realized that the app call wasn't contained within the content div in App.js
      My code looked like this:

      When it should have looked like this:


      Hope this helps anyone in the future that needs it!

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

      I am facing the same problem

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

    Hi thanks, teacher. You say set margin-left: auto to .links that shoots them over to the right "because the parent is displayed as flex". But I examined that it works fine even if not be there a parent as flex. Is right?

  • @sarvanisah2746
    @sarvanisah2746 4 месяца назад

    Hey Can you give me the font link here? I cannot able to access from you github profile as it is not there

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

    We want more of flutter videos , pleasse make some !

  • @Nick-rn3tj
    @Nick-rn3tj Месяц назад

    Hey, guys! Does anyone know how to access course files on Github or the channel author disabled them? The only thing I can access there is readme file :-(

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

    I had to add import './index.css'; in the App.js in order to make styles work. I am using IntelliJ. I don't understand why I need it, and on the video it is not necessary.

    • @arnavsawant1662
      @arnavsawant1662 2 месяца назад

      maybe you know that matters, like it might be important to import in VScode, but maybe in IntelliJ

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

    Sir plz make a video on e-commerce application

  • @Mahmudulhasan-ts5hm
    @Mahmudulhasan-ts5hm 3 года назад

    thanks

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

    Where and how i can copy data for index,css file from lesson #6 Help plz

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

    So what's the difference between index.css and app.css..... both are like global stylesheets right?

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

      Right? It seems like there's no difference, just a different file name for no reason

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

    in description where do i get description?

  • @RakeshKumar-bq3mf
    @RakeshKumar-bq3mf 3 года назад +1

    Hi Shaun, on github files, css files are not opening in "lesson-6" or others as well. Please check from your end. May be files are not uploaded correctly. Thanks

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

      Hey, all working for me, maybe there was an error yesterday, hopefully it's working for you now! :)

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

      In your component Navbar.js, the className must be className="navbar" not className="Navbar"

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

    thank but i cant get the css file ...

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

    ty.

  • @farazk9729
    @farazk9729 4 месяца назад

    Hi! Can anyone explain the difference between App.css and index.css?

    • @arnavsawant1662
      @arnavsawant1662 2 месяца назад

      your App.css is basically for the first react-app that you created, maybe it was only for that rotating react logo, it has nothing to do with our code, if you want you can do changes in it,
      index.css is the file that we will use for our classes that we create
      hope you might have understood!

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

    index.css not applied on page any solution

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

    The entire github repo is appearing empty for me for some reason.

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

    how do you import external styles, like from a cdn ?

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

      Import a local css file and in it @import url('');

  • @krish4659
    @krish4659 7 месяцев назад

    For some reason, margin:auto; for links is not pushing it to right side.

    • @krish4659
      @krish4659 4 месяца назад

      it worked, margin-left auto calculates the available space on the left side and occupies all the space

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

    best 💯💯💯💯💯💯💯💯

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

    Difference between App.css and Index.css?

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

      Got it. Index.css refers to all components. While App.css refers to App component and anything inside App component.

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

      ​@@kashmirtechtv2948 No, in React, whenever you import any CSS file, even if you only import it in a small component, it will get bundled into the final output. All CSS gets put into the single HTML file at the end so it really doesn't matter, every style file becomes rolled into one huge global namespace. You just have to use class and ID tags to apply specific styles

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

    How do I add the font offline? i don't have a constant internet connection so i want to load the font offline

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

    I got lost after deleting App.css . Now my app wont run on the local host

  • @daleevanrufila3390
    @daleevanrufila3390 Месяц назад

    where's the repo

  • @PriyanshuRaj-oc4tk
    @PriyanshuRaj-oc4tk 3 года назад

    nice

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

    its possible that the github link only have a readme file and no other files?

    • @ruki4969
      @ruki4969 Год назад +1

      Maybe it is late but will help some other people who have the exact question. You have to click on "branch" on the top of the respository and choose the lesson number to see the codes

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

    after deleting app.css I get an error and cant style anything in react folder, any solution?

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

    I’m sorry but I really did not understand why we needed to write our Css style in the index.css and not the app.css

  • @user-tw8et4ki4l
    @user-tw8et4ki4l 5 месяцев назад

    The code in Github do not show anymore!

    • @bekzoddoniyorov935
      @bekzoddoniyorov935 3 месяца назад

      The code is there on github, you just have to choose the relevant branch for each lesson. By default, it's on the main branch.

  • @malekalbawaih
    @malekalbawaih 7 месяцев назад

    can we mix bootstrap and react together??

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

    My H2 the homepage does not padd with the others and i copied it exactly from the github

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

      Hi, that's because .navbar .links in the CSS should actually be .navbar .link :) once you fix that, the margin-left: auto will apply correctly

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

      @@razvanudream How come when Shaun write "links" it works for him but not us?

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

      @@qwertmom I'm not entirely sure, maybe he never went back to change it in github, but the class in the NavBar needs to match the one in CSS for it to work :) whether it's links or link

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

      @@razvanudream Thank you it worked for me

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

      @@razvanudream thx

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

    been waiting for more, Thank you! Any chance we could get React with PHP MYSQL? for if anyone knows a good tut on it?

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

      What is it about?
      A separate technical stack.
      If you learn how to do POST/GET/PATCH/DELETE to an API with React then you are already set.
      PHP/Mysql are the backend, so they are separate from React and shouldn't be in "React" tutorials (ps. change to Python/Ruby (Rails)/NodeJS bro, PHP is a heavily old language [with that weird syntax], inconvenient - old timers who doesn't accept changes use it, whereas there is plenty of work for the languages listed above).

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

    All of your courses files are gone..

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

      not true, just select from the dropdown from the root directory page

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

    Can you use bootstrap instead of css?? Would appreciate if someone answers

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

    😍😍😍😍

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

    Brilliant