React – list of all factory methods of React.DOM

React has many factory methods for inbuilt components like div, span, etc. Here is javascript code snippet which can be used to dump all methods in React.DOM using Object.getOwnPropertyNames

var React = require("react");
console.log(Object.getOwnPropertyNames(React.DOM).filter(function (x) {
  return typeof React.DOM[x] === 'function'
Env: node version v5.12.0
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments