Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

What is a descriptor

Firtina Ozbalikci edited this page Oct 17, 2017 · 14 revisions

A descriptor allows React to create native elements.

What is an element?

An element is an object that is sent to react to be rendered.

For example, for React-DOM, these are all native elements:

  • <h1/>
  • <div/>
  • <span/>

And these are component elements:

  • <MyClass/>
  • <SignupForm/>

Where

class MyClass extends React.Component{
  render() {
    return <div>I'm a component!</div>;
  }
}

How do descriptors work?

TODO

Can you name them better?

[help needed]

Clone this wiki locally