Re:Understanding React Compiler
by throwAGIway on Saturday June 29, 2024 @04:58PM
(#40833313)
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.
[ Parent
| on HN ]
createElement is immediate. The component function call is not. It may never be called. Try const a = <App />;
App() will never be called.
Re:Understanding React Compiler
by throwAGIway on Sunday June 30, 2024 @02:40AM
(#40835511)
Yeah, 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.