ReactJS - .JS vs .JSX -


it confusing me when matter of creating react application.

there plenty of examples available on internet. out of them using .js file while using .jsx file.

i read .jsx file , says lets write html tags. same thing can written in .js file also.

then actual difference between these 2 extensions .js , .jsx ?

there none when comes file extensions. bundler/transpiler/whatever takes care of resolving type of file contents there is.

there other considerations when deciding put .js or .jsx file type. since jsx isn't standard javascript 1 argue not "plain" javascript should go own extensions ie., .jsx jsx , .ts typescript example.

there's good discussion here available read


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

minify - Minimizing css files -

php - How to remove letter in front of the word laravel -