I'm trying to implement my frontend side with React. Usually when I make a component I made a folder with a name like Header
and make index.js
in the folder so that I can easily import it with the folder name because index.js is automatically called in a folder.
import Header from "components/Header";
I recently started using Material-UI
and found a difference when they make a component in their framework. They make a folder with the same name Header
, but they put Header.jsx
in the folder. Is there a specific reason why they use jsx
extension? I thought my way is conventional, but since the framework made by Google
, I thought there might be a reasonable reason.