Rebuild #1.2: Just use F***ing use HTML


A friend of mine once told me, there are two wolves inside of every frontend developer:
just fucking use html vs just fucking use react.

At the end of my bootcamp, I was firmly in the React camp. For most situations, I still am. But as I navigate through components on my Mastermind rebuild, I keep looking back fondly at my vanilla JS version and thinking the same thing over and over: why didn’t I just fucking use HTML?

I decided to dive into the functionality once I got the layout down and styled to an acceptable level. That’s when the frustration set in. I’m losing steam because of the overhead and complexity React introduces for such a simple project. My original vanilla Mastermind was three files with very clear separations of concerns. Now I’m stuck in prop drilling hell, reconsidering the whole approach.

I’m tired of setting the state of the game board. More specifically, I’m bothered by the need to use state to handle the board when a simple 2D array worked fine before. Keeping the HTML and JavaScript separate made managing game state straightforward. With React, it feels unnecessarily complicated.

I think I’m ready to call this experiment a bust. It could be a skill issue, a planning issue, or both, but the juice isn’t worth the squeeze right now. I’m putting this project down.

Here’s what I’m concluding: simple games like Mastermind are better served by a vanilla stack. The cognitive load of React adds nothing to the user experience and only slows my development process.

Check out the original game here: MasterMind

Tell me in the comments: do you think this game would actually benefit from React, or do you agree that some projects are better left vanilla?



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *