3 ms·
The createElement function is called immediately, and it immediately calls your component function. I don't think this is a significant difference. Many librari
by throwAGIway 2y ago
The createElement function is called immediately, and it immediately calls your component function. I don't think this is a significant difference. Many libraries accept a callback and I'm really not ready to call all that a framework just based on that.
- recursive 2y agocreateElement is immediate. The component function call is not. It may never be called. Try const a = <App />; App() will never be called.
- throwAGIway 2y agoYeah, it will be called when you call render as in my original comment. Again, I don't think that passing a callback makes a framework.
- recursive 2y agoWhen you combine that with the fact that you can't invoke the function directly, this seems like the textbook definition to me. Agree to disagree I guess.