3 ms·
<div /> is a constant. It's syntactic sugar for React.createElement("div"), which is at runtime represented as an object {type:'div', ...} and a few other field
by wereHamster 10y ago
<div /> is a constant. It's syntactic sugar for React.createElement("div"), which is at runtime represented as an object {type:'div', ...} and a few other fields.
typeof <div /> === "object"
- rickhanlonii 10y agoI misspoke, yes it's a function call to React.createElement