Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Someone else asked that same question on Reddit [0], and Dan pointed out the paragraph in the post that answers it :

> One other possible heuristic could be to check for presence of a render method on the prototype. However, at the time it wasn’t clear how the component API would evolve. Every check has a cost so we wouldn’t want to add more than one. This would also not work if render was defined as an instance method, such as with the class property syntax.

[0] https://www.reddit.com/r/reactjs/comments/a2j6xk/how_does_re...



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: