From 1c940010b0cb5a785c150f78fc038475a0043ba9 Mon Sep 17 00:00:00 2001 From: yd2960 Date: Sun, 20 Apr 2025 13:07:02 -0400 Subject: [PATCH] added example for react css modules --- react/the_react_ecosystem/styling_react_applications.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/react/the_react_ecosystem/styling_react_applications.md b/react/the_react_ecosystem/styling_react_applications.md index d31e6be2505..6deaf6a4528 100644 --- a/react/the_react_ecosystem/styling_react_applications.md +++ b/react/the_react_ecosystem/styling_react_applications.md @@ -12,6 +12,14 @@ This section contains a general overview of topics that you will learn in this l Regular CSS is the simplest way to style. CSS Modules let you write CSS style declarations that are scoped locally, which means that we finally no longer have to worry about our class names potentially conflicting with other classes in the global scope. +```jsx +import styles from './styles.module.css'; + +function Button() { + return +} +``` + ### CSS in JS Why even write CSS in CSS when you can write it in JavaScript? Just kidding, of course!