React 101 – Components must start with capitals

A very important bit of doc to read: https://facebook.github.io/react/docs/jsx-in-depth.html#html-tags-vs.-react-components

TL;DR:

 

<component /> compiles to React.createElement('component') (html tag)

<Component /> compiles to React.createElement(Component)

<obj.component /> compiles to React.createElement(obj.component)


Leave a Reply

Your email address will not be published. Required fields are marked *