|
| 1 | +# Use React as our main frontend library |
| 2 | + |
| 3 | +## Context and Problem Statement |
| 4 | + |
| 5 | +At HOTOSM we mostly develop web applications, which require a frontend |
| 6 | +component. |
| 7 | + |
| 8 | +We need to balance: |
| 9 | + |
| 10 | +- Complexity / learning curve. |
| 11 | +- Existing knowledge of staff. |
| 12 | +- Knowledge of key contractors for various tools. |
| 13 | +- Performance. |
| 14 | +- Existing library support (community & ecosystem). |
| 15 | +- Scalability & maintainability. |
| 16 | + |
| 17 | +## Considered Options |
| 18 | + |
| 19 | +- Angular |
| 20 | +- Vue |
| 21 | +- React |
| 22 | +- Svelte |
| 23 | +- Solid |
| 24 | +- Qwik |
| 25 | +- Vanilla JS + Web Components |
| 26 | + |
| 27 | +## Decision Outcome |
| 28 | + |
| 29 | +This decision was made many years ago (~2018) with the introduction |
| 30 | +of Tasking Manager v3. |
| 31 | + |
| 32 | +The decision was to use React, as that is where the industry was |
| 33 | +centered around at that time. |
| 34 | + |
| 35 | +Due to technical debt, skills / knowledge with React within the team, and |
| 36 | +with various contractors, this decision has been carried forward into |
| 37 | +future projects, in an attempt to standardize: |
| 38 | + |
| 39 | +- The learning curve / pool of experience. |
| 40 | +- Speed and ease of setting up new projects. |
| 41 | +- Avoiding the churn of frontend libraries: contractors must use React. |
| 42 | + |
| 43 | +This decision still stands as of 2025, however, it is becoming |
| 44 | +[increasingly apparent](https://www.zachleat.com/web/react-criticism) |
| 45 | +that this should be revisited in the near future. |
| 46 | + |
| 47 | +There is also the higher level discussion for |
| 48 | +[if we need a frontend framework at all](https://infrequently.org/2024/11/if-not-react-then-what), |
| 49 | +as much of our functionality could be implemented with simpler HTML-first |
| 50 | +technologies such as HTMX, with |
| 51 | +[progressive enhancement](https://www.gov.uk/service-manual/technology/using-progressive-enhancement). |
| 52 | + |
| 53 | +As a result, some flexibility is possible to choose more suitable tools for |
| 54 | +newly started projects. |
| 55 | + |
| 56 | +### Consequences |
| 57 | + |
| 58 | +- Good, the many people have React experience. It broadens the pool of available |
| 59 | + contractors, and fits well with existing skills in the team. |
| 60 | +- Bad, because performance is superceded by frameworks that do not rely on the |
| 61 | + virtual-DOM, such as Svelte and Solid. |
| 62 | +- Bad, because React is not as user friendly as it claims to be. It's far easier |
| 63 | + to write bad React code, in comparison to frameworks like Svelte. |
| 64 | +- Bad, because this unfriendliness to new developers does not only affect performance, |
| 65 | + but also extends to the code complexity and ease of understanding / onboarding. |
| 66 | +- Bad, because we don't necessarily need a web framework for all our tools! |
| 67 | + We could probably build more resilient code using HTML with progressive enhancement. |
0 commit comments