Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 598 Bytes

react-elements.md

File metadata and controls

37 lines (28 loc) · 598 Bytes

React Elements

JS objects that describe elements on the DOM tree.

React reads them to construct the DOM and keep it up to date.

Example

// Note: this structure is simplified
const element = {
  type: 'h1',
  props: {
    className: 'greeting',
    children: 'Hello, world!'
  }
}

This object represents the following DOM node:

<h1 class='greeting'>
  Hello, world!
</h1>




Prev - Home | Next - JSX