4 ms·
To be fair <div /> is a function when converted from jsx to js
by rickhanlonii 10y ago
To be fair <div /> is a function when converted from jsx to js
- 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