Skip to content

i have “react-scripts”: “^4.0.3”, installed but still i’m not able to use Css Modules

    **This is my Styles.css File**

Iam importing these styles here but nothing is being applied to the heading

import React from "react"
import styles from "./Css/styles.css"

function App()
  return (
    <h1 class={styles.headingStyle}> CSS3 Testimonials Slider</ h1>

export default App


According to create-react-app documentation on CSS modules you should name your file styles.module.css and then import it like you already did

import styles from './styles.module.css';