Idea: Upgrade OpenELIS React app to the latest stable React version
What this is about
The OpenELIS React application is currently using React 17. While it is stable, it is now outdated. Most of the React ecosystem has moved forward, and staying on an older version increases long-term maintenance cost.
This idea proposes upgrading the app to React 18 (latest stable baseline) in a careful and controlled way.
This is not about adding new features. It is about keeping the frontend healthy, supported, and easier to maintain.
Why this upgrade is useful
1. Lower long-term maintenance cost
- React 17 is already several years old
- New libraries and tools assume React 18+
- Staying behind makes future upgrades harder and more expensive
Upgrading now prevents technical debt from growing.
2. Better performance for data-heavy screens
React 18 brings internal improvements like:
- Better batching of state updates
- Improved rendering behavior
For pages like reports, dashboards, and tables, this means:
- Smoother UI updates
- Fewer unnecessary re-renders
- Better experience on slower machines
3. Cleaner and more future-proof codebase
- Modern root API (
createRoot)
- Better compatibility with current and future libraries
- Easier adoption of modern patterns later if needed
Even without using new features immediately, the base becomes cleaner.
Why React 18 (and not React 19)
Why React 18
- Widely used in production
- Well-tested and stable
- Strong ecosystem support (routers, UI libraries, testing tools)
- Considered the current industry baseline
React 18 is the safest upgrade step from React 17.
Why not React 19 (for now)
- Too new for large production systems
- Many dependencies may not fully support it yet
- Higher risk of unexpected issues
For a healthcare-focused system like OpenELIS, stability matters more than early adoption.
React 19 can be evaluated later once the ecosystem matures.
Routing and navigation improvement (related to React upgrade)
Currently, many places in the app use window.location.href for navigation. This forces a full page reload and breaks the single-page app flow.
This issue is already tracked here:
https://github.com/DIGI-UW/OpenELIS-Global-2/issues/1465
Using window.location.href causes:
- Full reload of the app on navigation
- Loss of in-memory state and cache
- Slower navigation between pages
- Harder-to-maintain navigation logic
With a proper React upgrade, we can move toward React-based navigation instead:
- Use React Router navigation (
history.push, useNavigate where applicable)
- Let React handle routing without full reloads
- Make navigation faster and more predictable
This change:
- Improves user experience
- Reduces unnecessary reloads
- Makes the app behave like a true SPA
- Fits naturally with a React 18 upgrade
Risk and cost impact
This upgrade:
- Does not change business logic
- Does not require UI redesign
- Can be done incrementally
Main work includes:
- Updating React and React DOM
- Fixing minor compatibility issues
- Running existing unit and Cypress tests
Doing this now is cheaper and safer than delaying it.
Suggested upgrade approach
- Upgrade React and React DOM to React 18
- Keep existing patterns and APIs working
- Fix issues module by module
- Validate behavior using existing tests
No big-bang rewrite is required.
Why this is good for OpenELIS
- Keeps the frontend stack supported and modern
- Reduces future migration risk
- Improves performance without changing user workflows
- Makes the codebase easier for new contributors to understand
Summary
Upgrading to React 18 is a practical and low-risk improvement. It reduces technical debt, improves performance, and prepares OpenELIS for future development — without introducing instability. This makes it a solid and valuable GSoC 2026 contribution.