Skip to content

Latest commit

 

History

History

import-css-classes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

How to import CSS class names in React properly

In this video I'll show you how to make your React application more reliable. Your components and class names will always be consistent. And the next time, when you remove the class name so that it no longer exists, you will get a compilation error.

In this video you'll also know how to fix the Cannot find module './App.css' error. If you want to properly import CSS classes into TSX by checking for their existence when compiling your application, implement this approach so that you don't have inconsistencies between your components and styles.

Watch on youtube: https://youtu.be/t-tQuDL-cS8

IMAGE ALT TEXT HERE

Used commands:

  • npx create-react-app my-app --template typescript
  • npm run start
  • npm install -D dts-css-modules-loader
  • git add . && git commit -m "Initial commit"
  • npm run eject
  • npm run build

Join the Discord: https://discord.gg/V4yMGPQzRB

Follow Me Online Here:

#react #css #typescript