Styling React Components with CSS Modules

Styling React Components with CSS Modules

Telmo Sampaio

3 года назад

96,101 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@srikantaprasadrajeurs5069
@srikantaprasadrajeurs5069 - 05.12.2023 04:58

tq

Ответить
@sharfarajahamed2568
@sharfarajahamed2568 - 16.11.2023 14:06

Thanks alot

Ответить
@dashpindersingh9062
@dashpindersingh9062 - 27.09.2023 07:51

Thanks dude:)

Ответить
@Orevitalizador
@Orevitalizador - 26.08.2023 22:02

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.

Ответить
@sahhaBoy
@sahhaBoy - 24.08.2023 21:24

this goes against the whole idea behind css and design consistency but hey.. good to know :)

Ответить
@muzammil6651
@muzammil6651 - 09.08.2023 18:56

What a fantastic explanation, thank you so much

Ответить
@davidorevic6651
@davidorevic6651 - 25.07.2023 23:34

Should we do it for every single class?

Ответить
@daftkiwi
@daftkiwi - 20.07.2023 01:12

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!

Ответить
@sketchychillandchill
@sketchychillandchill - 16.07.2023 12:33

It's cool when there is like 2 styles to scope but when you want it scoped for each components just switch to vuejs

Ответить
@nguyenhaidung8833
@nguyenhaidung8833 - 30.06.2023 20:15

*tip hat

Ответить
@user-sx4yb8zt8d
@user-sx4yb8zt8d - 30.06.2023 15:09

eh... use more semantic class names maybe? there you have BEM. Why use a technology for solving a problem that could be solved by a better naming strategy?

Ответить
@DeliveryMais
@DeliveryMais - 17.06.2023 16:21

GREAT

Ответить
@radepetrovic9182
@radepetrovic9182 - 03.05.2023 15:22

Tnx

Ответить
@lyndonraya7769
@lyndonraya7769 - 29.04.2023 14:33

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
}
}
]
}
]
}
};

Ответить
@omotehinseelvis9845
@omotehinseelvis9845 - 16.04.2023 22:49

So simple and straight forward....I love it. Thank you

Ответить
@axe.anonym
@axe.anonym - 11.03.2023 13:35

thank you

Ответить
@atom3572
@atom3572 - 06.03.2023 03:37

i subscribed

Ответить
@yuvarajg3855
@yuvarajg3855 - 02.03.2023 10:43

Thank you so much🤝

Ответить
@digvijayyamagekar4300
@digvijayyamagekar4300 - 01.03.2023 19:44

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 <button> 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 <button> ?

Ответить
@mac.ignacio
@mac.ignacio - 24.02.2023 10:00

Tooo much work for scoping CSS. Try Angular you will not have this problem.

Ответить
@sergiogarcia-di5nj
@sergiogarcia-di5nj - 12.02.2023 21:43

really really helpful, thank you very much !

Ответить
@mendibhut4855
@mendibhut4855 - 31.01.2023 21:28

Thank you, man. It really helps me a lot.

Ответить
@mehmetcelmeli9918
@mehmetcelmeli9918 - 24.01.2023 21:15

Thank you for simple explantion TELMO✌✌✌✌we are looking forward to the others videos😊😊😊

Ответить
@faustovii1085
@faustovii1085 - 17.01.2023 19:52

man you are a god of teaching for sure

Ответить
@milkdrom3da
@milkdrom3da - 11.01.2023 03:29

Very useful! Thanks for sharing!

Ответить
@valakas3636
@valakas3636 - 01.01.2023 16:32

Great video helped me understand css modules

Ответить
@sane4959
@sane4959 - 31.12.2022 16:21

Thanks alot

Ответить
@polinapanova1482
@polinapanova1482 - 19.12.2022 15:45

L

Ответить
@OneBrokeBloke
@OneBrokeBloke - 10.12.2022 14:23

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?

Ответить
@teeyiheng4697
@teeyiheng4697 - 07.12.2022 08:11

I understand why use css module now thank😆

Ответить
@Whisperme2sleep
@Whisperme2sleep - 08.11.2022 01:35

How do you do conditional classes with this technique?

Ответить
@TheFOTONMAN
@TheFOTONMAN - 05.10.2022 16:14

Thanks for your video. I fastly reminded how to connect css (scss) modules.

Ответить
@woolygan1529
@woolygan1529 - 30.09.2022 07:02

Helpful thanks

Ответить
@ahmadcodes
@ahmadcodes - 22.09.2022 11:33

tnx

Ответить
@slipstream01
@slipstream01 - 22.09.2022 02:04

excellent explanation. shukran

Ответить
@electricindro2236
@electricindro2236 - 15.09.2022 09:06

Thank you for explaining the importance of React css module

Ответить
@ibrahimkhurshid4339
@ibrahimkhurshid4339 - 08.09.2022 16:15

Thanks buddy!! Jazakallah

Ответить
@herlandertavares7573
@herlandertavares7573 - 01.09.2022 10:41

Great video. I didnt even have to see your name, I knew by your accent you were Portuguese lol. Obrigado pelo video

Ответить
@arashvincent8519
@arashvincent8519 - 13.08.2022 13:35

dose it work with sass ?

Ответить
@shrishri8453
@shrishri8453 - 12.08.2022 07:28

Tnq sm

Ответить
@velikorossnationalist4259
@velikorossnationalist4259 - 20.07.2022 15:51

Greetings! How could i make my components responsive if i use css modules?

Ответить
@ranati2000
@ranati2000 - 18.07.2022 13:30

Can i use bootstrap classes in it ?

Ответить
@snake1625b
@snake1625b - 15.07.2022 18:58

className takes in a string but you're passing in a class, how is that possible. sorry if I missed the answer to this

Ответить
@AYUSHSHARMAblogs
@AYUSHSHARMAblogs - 26.06.2022 13:58

Lots of thanks for such a wonderful video on css modules

Ответить
@roronoa_d_law1075
@roronoa_d_law1075 - 25.04.2022 16:03

this is not working for me, the style is still applied globally

Ответить
@jagmohansingh5222
@jagmohansingh5222 - 23.04.2022 10:10

that wasup thanks man
really helped

Ответить
@anaisrevellat5692
@anaisrevellat5692 - 12.04.2022 11:35

Thank you this tutorial is crystal clear , perfect.

Ответить