DEV Community

Discussion on: React's render() Doesn't... Render

Collapse
 
sirseanofloxley profile image
Sean Allin Newell • Edited

This is a pretty good stab at a larger class of problems imo. How to write great, self documenting libraries - and beyond that how to maintain the library once it gets a strong following.

I mostly agree that renaming render to reconcile (or perhaps buildTree or mkVnode...) would level up the clarity once a dev starts writing app code that needs to update itself conditionally and handle state.

Now how would you address useEffect and its dependency array?

Collapse
 
bytebodger profile image
Adam Nathaniel Davis • Edited

I would rename it to theAutoMagicalFunctionThatWasSupposedToReplaceAllTheLifecycleMethods_ButFailed()

Collapse
 
antonmelnyk profile image
Anton Melnyk

Ouch