NedReid / ButlerJCRWebsite

A work-in-progress website for Butler! 💛❤
2 stars 0 forks source link

Migrate to functional React #85

Open NedReid opened 6 months ago

NedReid commented 6 months ago

Description of issue

Right now, pretty much the entirety of the repository is written in class-based React. This is clearly not the direction that React is going in, and may be spun out/deprecated in the future (though not any time soon).

Do we want to spend time changing the repository to functional React? I see 3 options

  1. Leave it be - continue to use Class components throughout the repository
  2. As-you-go strategy - write all new future classes using functional react, and convert files to functional react whenever they are refactored/modified
  3. Active strategy - Create tickets to refactor sets of classes to functional React.

To be honest, I believe 3 would be the easiest option if we were to actively make this transition. It shouldn't be a massive time commitment to change these files to functional React, especially when done in small batches of files at a time. I think 2 would work fine, but this website isn't maintained enough where we'll see the website ever fully transition away from class-based React. It'll likely end up as just a mish-mash between the two which isn't ideal.

Let me know your thoughts! Would be interested to here what you think!