Answer the question
In order to leave comments, you need to log in
When to use .js files and when .jsx? How do they differ from each other?
I noticed that some people use the .jsx extension to create react components.
How is it different from .js?
When does it apply?
Answer the question
In order to leave comments, you need to log in
I use jsx when I have jsx markup.
If pure js, then js.
But I also know the approach when jsx is always used.
There is no reason to follow this rule from Airbnb's lint.
Create a crite react app and you will see that .jsx files are not used there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question