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

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -