Skip to content

Instantly share code, notes, and snippets.

View kwonmory's full-sized avatar
🎯
Focusing

KWONMORY kwonmory

🎯
Focusing
View GitHub Profile

Using the classnames.bind method

Many people who work with React are familiar with the excellent classnames library. If you aren't familiar, it provides a simple function for gluing classnames together. In web programming in general, there are many times that we need to add or remove multiple classes based on conditional logic. The classnames library makes this easy.

More and more developers are embracing CSS Next and the power of CSS modules. However, when you add CSS modules to your react components, working with classnames gets more difficult. Typically, CSS modules is implemented with class name mangling. Transforming human readable class name strings into unique identifiers helps ensure that every class name in your app is unique.

This means that you can write your component CSS in isolation without worrying about the dreaded class name collisions that have plagued CSS

@kwonmory
kwonmory / SSQQ
Last active September 19, 2020 04:17
<학습 저장소>
https://github.com/slow-slow-quick-quick
ᕱ ᕱ ||
( ・ω・ ||
/ つΦ>
@kwonmory
kwonmory / I'm a night 🦉
Last active October 29, 2020 00:23
Commit Here
🌞 Morning 53 commits █▋░░░░░░░░░░░░░░░░░░░ 8.2%
🌆 Daytime 222 commits ███████▏░░░░░░░░░░░░░ 34.3%
🌃 Evening 236 commits ███████▋░░░░░░░░░░░░░ 36.5%
🌙 Night 136 commits ████▍░░░░░░░░░░░░░░░░ 21.0%