DEV Community

Discussion on: What's the worst code you've ever written?

Collapse
 
onlyphantom profile image
Samuel Chan

Didn’t know React but was called in to do some last minute changes which needs to be committed under a deadline.

Using location.reload() to refresh the browser after a react state change that wasn’t rendering the intended component.

Got so sick in the stomach writing it. Had to purge it from git history so it never exist. Spend the weekend learning React proper.

It felt dirty. I never fully recovered.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

C'mon that's not that bad 😂😂😂