what is the functionality of:
/** @jsx React.DOM */
I have seen this line is added on top of so many files in my current project but I am very confused why its added. :(
Since React v0.12, there's no more /** @jsx React.DOM */, see here.
They call it "The @jsx Pragma". It was used to allow you to specific how the output of the React Transformer should look.
So, back in the days, when compiling JSX expressions to JavaScript, they defaulted to React.createElement() calls. But you could modify this behavior with the beginning /** @jsx React.DOM */ comment. The idea was to make the transform more generic and allow you to specific how the output should look.
Not anymore. The React team shares in their release v0.12 notes:
We have wanted to do this since before we even open sourced React. No more
/** @jsx React.DOM */!. The React specific JSX transform assumes you have React in scope (which had to be true before anyway).