How to use the DOM function from react
Find comprehensive JavaScript react.DOM code examples handpicked from public code repositorys.
163 164 165 166 167 168 169 170 171
helloWorld: 'Hello world!' }); var HelloWorld = React.createClass({ mixins: [backboneMixin], render: function () { return React.DOM.div({}, this.state.model.helloWorld); } }); var HelloWorldFactory = React.createFactory(HelloWorld);
73
815
23
34 35 36 37 38 39 40 41 42
우선, 밑의 `require`를 추가하세요. ``` var React = require('react'); var ReactDOMServer = require('react-dom/server'); var DOM = React.DOM; var body = DOM.body; var div = DOM.div; var script = DOM.script;
146
531
13
42 43 44 45 46 47 48 49 50 51
function makeIndex () { var list = fs.readdirSync(ENTRIES_DIR).filter(function(dir) { return isDirectory(path.join(ENTRIES_DIR, dir)); }).map(function (dir) { return React.DOM.li({}, React.DOM.a({href: '/'+dir}, dir.replace(/-/g, ' '))); }); var markup = React.renderToStaticMarkup(( React.DOM.html({}, React.DOM.link({rel: 'stylesheet', href: '/shared.css'}),
7
101
7
+ 9 other calls in file
158 159 160 161 162 163 164 165 166 167
var inputValue = input.value; var inputRect = input.getBoundingClientRect(); // ... } }, function (props) { return React.DOM.input({ value: props.cursor.get('text'), ref: 'myInput' }); }); ``` #### Talking back from child to parent
55
0
36
+ 7 other calls in file
react.default is the most popular function in react (505 examples)