3 ms·
Why downvote when this is perfectly known in basic history ? Maybe you only started using React recently ? Previously,class components were the primary way to
by lenkite 2y ago
Why downvote when this is perfectly known in basic history ? Maybe you only started using React recently ?
Previously,class components were the primary way to manage state and lifecycle methods.
Lifecycle methods like componentDidMount, componentDidUpdate, and componentWillUnmount were heavily used.
Now, functional components with Hooks (useState, useEffect, etc.) are the best practice. There were several iterations of different practices in between.
Previously, props were passed through multiple layers of components (prop drilling was established practice).
Now Context is used. State management, event handlers, component structure, CSS-in-JS: pretty much everything has changed over time.
No - I used React in the past, but no longer use it. Maintenance is a head-ache. I am utterly certain that within the next 2 years, another "life-changing" React paradigm will come into effect - can even bet on it.