MaximilianAdF / NoPixel-MiniGames-4.0

A web-based project designed to replicate/build similar "hacking" challenges to those that can be found on the NoPixel 4.0 FiveM Server. Constructed using React, Next.js, with TailwindCSS, TypeScript, HTML & CSS. ↓ Deployed to Vercel ↓
https://no-px.vercel.app
101 stars 42 forks source link

Framework Restructure #38

Closed BobDotCom closed 8 months ago

BobDotCom commented 8 months ago

I believe a framework such as React would be beneficial to the project, for a couple of reasons.

  1. There's currently a bunch of duplication between pages. I partially addressed this in #37 for the CSS, but without a framework there's not much that can be done about html duplication. A framework would allow for elements to be broken down into separate files and imported into each page.
  2. It would help with performance. React would optimize how the DOM is updated using react states and effect hooks.
  3. Better maintainability. It would abstract away the need for code to update the DOM. TSX is a quite powerful tool for templating.

And a couple more reasons, but I'll keep it short for now.

I'd be willing to work on a restructure like this, but first I'd like to check if you (@MaximilianAdF) are willing/able to maintain it. If you don't know React or would prefer not to use it, a refactor wouldn't make sense. If you'd like me to go more in-depth about the benefits (and any possible downsides), let me know.

MaximilianAdF commented 8 months ago

Although I am not super familiar with React I think it's a great idea to implement React as a framework, especially as a learning method. This upcoming week I will be rather preoccupied, but as soon as it starts to alleviate I would be more than happy to work on this restructure.