'How is CSS getting loaded/applied to a Component even though I am not passing it as props?

I am following an online tutorial which has an index.css file which is imported in the index.js file as: import './index.css';

After that the App component is is rendered in index.js like:

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

Now I what I am having difficulty understanding is that how is the CSS being applied to the App component even though I am not passing it as a prop.

How is the App component able to access the CSS even without props ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source