Styling React Components with CSS Modules

  Рет қаралды 104,723

Telmo Sampaio

Telmo Sampaio

Күн бұрын

Пікірлер: 130
@bkatsevych
@bkatsevych Жыл бұрын
Probably the best explanation of CSS Modules you can find on KZbin. Thanks a lot, Telmo!
@Webtricker
@Webtricker 2 жыл бұрын
Thank you so much for explaining React components with CSS modules in such a simple and beautiful way. That was very helpful
@daftkiwi
@daftkiwi Жыл бұрын
Before watching this tutorial, I used to find css modules and its import and reference styles using JavaScript syntax quite complex for its benefits. That's why I avoided modules like the plague. Thank you Telmo, this was very helpful!
@troubledtom5250
@troubledtom5250 9 ай бұрын
honestly as someone who just came here to learn about css in react... you taught me a new concept i didn't knew about thanks
@cesarcortes5063
@cesarcortes5063 11 ай бұрын
i was looking everywhere because i had very problems with the css styles , and you have resolved it, thanks a lot Telmo
@danieltkach2330
@danieltkach2330 3 жыл бұрын
You rock. Thanks for the instruction. Why everyone says we have to either eject or install some script modules from start? What you describe works just fine...
@jiharedconteh4530
@jiharedconteh4530 10 ай бұрын
This video is very useful for styling individual components. Thank you for such a simplified explanation.
@NoajmHeritage
@NoajmHeritage 8 ай бұрын
Prefect. Chatgpt failed to give me this option. Amazing for no css conflict
@lingolearner27
@lingolearner27 8 ай бұрын
you solved my problem. was stuck with this for couple of hours. thank you bro.
@Mattyamungu
@Mattyamungu 21 күн бұрын
Thanks you. Was wondering why I was having issues sizing my page
@electricindro2236
@electricindro2236 2 жыл бұрын
Thank you for explaining the importance of React css module
@redefamatv
@redefamatv 2 жыл бұрын
Thanks for sharing Telmo, Im still learning the basics of react but it was a really helpful tutorial to strengthen my basic knowledge in order to going forward to more advanced tips very soon...hugs from Brazil...just keep it up.
@victoradodo8377
@victoradodo8377 2 жыл бұрын
Special thanks YOU deserved NATIONAL AWARD
@coding_stuff_uz
@coding_stuff_uz 7 ай бұрын
Tankyou bro for this tutorial
@Viralvlogvideos
@Viralvlogvideos Жыл бұрын
KZbinrs like you deserves lot of subs. I subbed you. Please do make React tutorials in depth with building projects like TODO and ecommerce etc.
@yinkagiwa8659
@yinkagiwa8659 3 жыл бұрын
I love how clear the video is
@faustovii1085
@faustovii1085 Жыл бұрын
man you are a god of teaching for sure
@nathanvsplayer
@nathanvsplayer Жыл бұрын
Great video helped me understand css modules
@sketchychillandchill
@sketchychillandchill Жыл бұрын
It's cool when there is like 2 styles to scope but when you want it scoped for each components just switch to vuejs
@Viktorres1
@Viktorres1 2 жыл бұрын
Thanks for your video. I fastly reminded how to connect css (scss) modules.
@SofiaBelchiorinho
@SofiaBelchiorinho 2 жыл бұрын
Very useful vídeo :) I was using this technique already (because it comes with Nx workspaces) but I ddin't know it was called CSS Modules. Keep up the good work!
@digvijayyamagekar4300
@digvijayyamagekar4300 Жыл бұрын
I had one question. let's say there are two components, A and B and two CSS files A.css and B.css, and compo A and B have several in them now let's say I want to color all buttons in A red and all buttons in B blue. can I solve this problem without giving the class name to ?
@FaselGodbcho
@FaselGodbcho 6 ай бұрын
thank u, I was so frustrated and this video helped a lot
@pumdu
@pumdu 2 жыл бұрын
Thanks a lot. I wondered why I need to use CSS module and this video made it clear to me. :)
@nishantsinha4336
@nishantsinha4336 10 ай бұрын
Made it look simple.Well explained!
@Trafficfromsky
@Trafficfromsky 3 жыл бұрын
how do you target/change the tag without a class name?
@itouchgrass869
@itouchgrass869 2 жыл бұрын
Just use “body” selector without a class
@Orevitalizador
@Orevitalizador Жыл бұрын
thank u sr, this tutorial was very usefull for me , and im glad, the way u used to explain , gave me some Brainstorming thanks guy.
@mathiasmatanda8848
@mathiasmatanda8848 2 жыл бұрын
You saved me from a big headache thank you man!
@kunaljethva9623
@kunaljethva9623 3 жыл бұрын
Thanks for making this video was searching for it since 😊😊
@raunakkumar6144
@raunakkumar6144 10 ай бұрын
Thanks man , I was having exact same problem
@mehmetcelmeli9918
@mehmetcelmeli9918 Жыл бұрын
Thank you for simple explantion TELMO✌✌✌✌we are looking forward to the others videos😊😊😊
@omotehinseelvis9845
@omotehinseelvis9845 Жыл бұрын
So simple and straight forward....I love it. Thank you
@qanswered319
@qanswered319 2 жыл бұрын
Great video.understood module clearly. No time wasted
@AYUSHSHARMAblogs
@AYUSHSHARMAblogs 2 жыл бұрын
Lots of thanks for such a wonderful video on css modules
@gregduke8193
@gregduke8193 9 ай бұрын
Great video, very well explained. I don't really see the point in using modules though... you have to type a lot more code for it to just add a unique classname in the end anyway so why not use id for individual styling and then you can use classnames for universal styling? Like if I wanted all the buttons to have 20px padding I could give them the classname of btn and give them all 20px padding and then I could use an id for each button also to, for example, change the background color if I wanted them to have different background colors.
@anaisrevellat5692
@anaisrevellat5692 2 жыл бұрын
Thank you this tutorial is crystal clear , perfect.
@rakhmatillorakhmonberdiev231
@rakhmatillorakhmonberdiev231 3 жыл бұрын
Thanks bro, that is what I expected to understand this topic, very clear explanation!
@shubhamkaushal2125
@shubhamkaushal2125 9 ай бұрын
really like your accent very good way of teaching
@muzammil6651
@muzammil6651 Жыл бұрын
What a fantastic explanation, thank you so much
@teeyiheng4697
@teeyiheng4697 Жыл бұрын
I understand why use css module now thank😆
@vigneshwarvenugopal922
@vigneshwarvenugopal922 8 ай бұрын
Thank you so much dude., problem solving ., i score you 100 of 100...🌟🌟🌟
@mehedi13577
@mehedi13577 Жыл бұрын
Thank you, man. It really helps me a lot.
@patcodingcodester9781
@patcodingcodester9781 3 жыл бұрын
Haha thank you!. This is exactly what I was looking for but it was hard to find..
@OneBrokeBloke
@OneBrokeBloke Жыл бұрын
I get the problem it solves, just not why the problem is there in the first place. Like, we have a component called Example.js In that, we import example.css So since this is the only place that this CSS is imported and therefore used, why can it conflict with other components? They havent linked/imported the stylesheet?
@ramon4756
@ramon4756 11 ай бұрын
Thanks you! Explained my issue
@ghofranedarragi5601
@ghofranedarragi5601 3 жыл бұрын
thank u .simple and clear explanation .it's useful
@heikkiladau6872
@heikkiladau6872 6 ай бұрын
Can you add css styles inside of the script tag in react application?
@davidorevic6651
@davidorevic6651 Жыл бұрын
Should we do it for every single class?
@codelightsparkles2403
@codelightsparkles2403 3 жыл бұрын
You’re awesome Telmo
@Telmosampaio
@Telmosampaio 3 жыл бұрын
Thanks Code Light 😊
@pravinchoudhary5105
@pravinchoudhary5105 2 жыл бұрын
Thanks Man, Helped a lot
@herlandertavares7573
@herlandertavares7573 2 жыл бұрын
Great video. I didnt even have to see your name, I knew by your accent you were Portuguese lol. Obrigado pelo video
@milkdrom3da
@milkdrom3da Жыл бұрын
Very useful! Thanks for sharing!
@irorochadere9207
@irorochadere9207 3 жыл бұрын
Thanks, buddy. It worked well for me.
@Lemon.8
@Lemon.8 3 жыл бұрын
Thanks for the tutorial, very well explained.
@siaxiong333
@siaxiong333 2 жыл бұрын
Very usefull and great video! I like that you're straight to the point. Thank you so much!
@slipstream01
@slipstream01 2 жыл бұрын
excellent explanation. shukran
@sergiogarcia-di5nj
@sergiogarcia-di5nj Жыл бұрын
really really helpful, thank you very much !
@mubashirwaheed474
@mubashirwaheed474 3 жыл бұрын
Thanks you so much for this video.
@gihanrangana6248
@gihanrangana6248 3 жыл бұрын
how can i create global variables for scss modules?
@thisaraharshana2168
@thisaraharshana2168 3 жыл бұрын
Thank you sir. well explained!!.
@SatishKumar-qi4hb
@SatishKumar-qi4hb 3 жыл бұрын
nice and helpful video. thx so much.
@ibrahimkhurshid4339
@ibrahimkhurshid4339 2 жыл бұрын
Thanks buddy!! Jazakallah
@phuongla4512
@phuongla4512 3 жыл бұрын
Thanks bro. This is useful
@Whisperme2sleep
@Whisperme2sleep 2 жыл бұрын
How do you do conditional classes with this technique?
@davidlafontant2185
@davidlafontant2185 2 жыл бұрын
Very useful. Thank you.
@janardanpethani5755
@janardanpethani5755 3 жыл бұрын
Thanks you for sharing 😀😀
@rohil3023
@rohil3023 3 жыл бұрын
Very useful. Thanks for the tutorial :)
@angelmgl8137
@angelmgl8137 3 жыл бұрын
Nice video bro, thanks a lot
@swerami
@swerami 3 жыл бұрын
thank you so much for this!
@igelkotte
@igelkotte 10 күн бұрын
This seems more complex than to just use a different css class name. What's the benefits? I'm new so I'm probably missing something
@arshadahamed988
@arshadahamed988 6 ай бұрын
In module.css file can we create more than one class or Id in the file??
@davidgrig4608
@davidgrig4608 3 жыл бұрын
very helpful tutorual ty very much
@hemantjadhav7833
@hemantjadhav7833 3 жыл бұрын
great video sir
@amershboul9107
@amershboul9107 3 жыл бұрын
really helpful, thanks
@webdevvideos2744
@webdevvideos2744 2 жыл бұрын
will using css module impact performance?
@CodewithAby
@CodewithAby 3 жыл бұрын
Good tutorial...it is timely
@matiascstudios
@matiascstudios 3 жыл бұрын
Thanks a lot!
@ranati2000
@ranati2000 2 жыл бұрын
Can i use bootstrap classes in it ?
@goncalosantos3604
@goncalosantos3604 3 жыл бұрын
Excellent as always! Abraço
@jatinahuja6840
@jatinahuja6840 3 жыл бұрын
Thank you for helping man! 🙌 Please keep making such videos 🥇🎖 Can you also tell how to use css modules concept with bootstrap or I will say if I want to use bootstrap different version. Thanks in advance 👍
@dashpindersingh9062
@dashpindersingh9062 Жыл бұрын
Thanks dude:)
@mahdouirami2776
@mahdouirami2776 3 жыл бұрын
When i did it with a complicated name like form-control , it made me an error have u any solution ?
@arashvincent8519
@arashvincent8519 2 жыл бұрын
dose it work with sass ?
@woolygan1529
@woolygan1529 2 жыл бұрын
Helpful thanks
@manasjoshi7037
@manasjoshi7037 3 жыл бұрын
Thank you for this,
@dungvu8790
@dungvu8790 3 жыл бұрын
thank you
@sane4959
@sane4959 Жыл бұрын
Thanks alot
@ahmadcodes
@ahmadcodes 2 жыл бұрын
tnx
@carlafaes9282
@carlafaes9282 3 жыл бұрын
buen video!muchas gracias :D
@nullcarry6893
@nullcarry6893 3 жыл бұрын
Hate to say it but vue seems to have a better out of the box solution.
@roronoa_d_law1075
@roronoa_d_law1075 2 жыл бұрын
this is not working for me, the style is still applied globally
@abhishekprasad6317
@abhishekprasad6317 3 жыл бұрын
What if i have to apply two classname will I do :- className={stylesCSS.firstclass} className={stylesCSS.secondclass} ? or i have any option similar to: className={stylesCSS.firstclass, stylesCSS.secondclass} ??
@abhishekprasad6317
@abhishekprasad6317 3 жыл бұрын
got the solution stackoverflow.com/questions/33949469/using-css-modules-how-do-i-define-more-than-one-style-name
@shrishri8453
@shrishri8453 2 жыл бұрын
Tnq sm
@miraasif3419
@miraasif3419 3 ай бұрын
Thankyou for this man @Telmo Sampaio
@iamwright
@iamwright 2 жыл бұрын
Very good.
@tamahome99
@tamahome99 Жыл бұрын
you did not include on your tutorial that we need to do this , module.exports = { module: { rules: [ { test: /\.css$/, use: [ 'style-loader', { loader: 'css-loader', options: { modules: true } } ] } ] } };
@sebastianandersson6892
@sebastianandersson6892 2 жыл бұрын
04:06 sounded American for just a second there!
@RoyerAdames
@RoyerAdames 3 жыл бұрын
And how do you add multiple class names?
@Telmosampaio
@Telmosampaio 3 жыл бұрын
Styles.classname(‘${myclass1} ${myclass2}’)
@snake1625b
@snake1625b 2 жыл бұрын
className takes in a string but you're passing in a class, how is that possible. sorry if I missed the answer to this
@srikantaprasadrajeurs5069
@srikantaprasadrajeurs5069 11 ай бұрын
tq
Why you should look into these React component styling options!
27:17
Styled Components Full Tutorial - Style Your Components in React
23:54
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,1 МЛН
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 2,9 МЛН
ReactJS Tutorial - 20 - Styling and CSS Basics
11:40
Codevolution
Рет қаралды 517 М.
The Best Way To Style Components In React | CSS Modules
4:35
The Ethical Technologist
Рет қаралды 20 М.
CSS Modules: Why are they great?
12:03
Harry Wolff
Рет қаралды 40 М.
7 ways to deal with CSS
6:23
Fireship
Рет қаралды 1,1 МЛН
Auto Deploy React & Node.js with Github Actions CI/CD
1:08:42
Telmo Sampaio
Рет қаралды 63 М.
React js how to add CSS styles 🎨
8:16
Bro Code
Рет қаралды 36 М.
CSS Styles in React JS | Learn ReactJS
7:29
Dave Gray
Рет қаралды 37 М.
These CSS PRO Tips & Tricks Will Blow Your Mind!
8:48
Coding2GO
Рет қаралды 473 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 392 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2,1 МЛН