DEV Community

Discussion on: Tell me a bug story

Collapse
 
darksmile92 profile image
Robin Kretzschmar

The most recent example was the 10pm idea to "Just upgrade react and rewrite all components to arrow functions and use hooks".

Worst.Idea.Ever.

I upgraded react, rewrote all components to be arrow functions and use hooks (useState, useRef, useEffect), aswell as property destructuring (const Comp = ({ classes, children, fancyProp }) => instead of just const Comp = props =>).

This took me about 1 hour and I just wanted to run it to check everything is behaving the same before pushing the changes.
Oh boy, I was so sure I'm gonna make it to bed on time!

Starting with wrong dependencies after the react upgrade, I needed to upgrade other packages too. And this was where the struggle began. Suddenly babel showed me just Not implemented and nothing else.
After searching a while I became aware that I forgot to upgrade the react-router-dom package.
Next try: ... Object({...}) not implemented. 😒
A good 30 minutes later and with rage pulsating veins, I found out that the @material-ui/core package was upgraded and now there are some changes I need to implement.
Almost 4 hours later, I finally got everything working again and I swore to myself that I would never do something like that so late in the evening 😂