Why We Ditched React and Built Financial Calculators in Vanilla JavaScript (And How It Made Everything Better)




The Framework Trap

Every developer has been there. You start a new project and immediately reach for your favorite framework:

npx create-react-app my-calculator
# Installing 1,453 packages...
# 3 minutes later...
# node_modules folder: 289 MB
Enter fullscreen mode

Exit fullscreen mode

Three minutes and 289 MB later, you have a “Hello World” that takes 2 seconds to load on 3G.
For a calculator.
When we started building ToolsForIndia.com, we almost fell into the same trap. But then we asked a simple question:
“Do we actually need React for this?”
Spoiler: We didn’t. And going vanilla JavaScript made everything faster, simpler, and more maintainable.



The Requirements: What We Actually Needed

Before choosing our tech stack, we listed our actual requirements:
Must Have:

✅ Fast load times (< 1 second on 3G)
✅ Client-side calculations (privacy)
✅ Export to PDF/CSV
✅ URL parameter sharing
✅ Mobile responsive
✅ Works offline (after first load)

Nice to Have:

✅ Charts and visualizations
✅ Dark mode (future)
✅ Multiple language support (future)

Don’t Need:

❌ Real-time collaboration
❌ Complex state management
❌ Server-side rendering
❌ Database integration (yet)
❌ User authentication (yet)

Verdict: None of our “must haves” require a framework. We were about to add 289 MB of dependencies for features we didn’t need.



The Stack: Intentionally Simple

Here’s our entire tech stack:




    
    


Enter fullscreen mode

Exit fullscreen mode

Total bundle size: ~200 KB
Load time on 3G: < 1 second
Build time: 0 seconds (no build step!)



Architecture Decisions: Why Each Choice



1. Vanilla JavaScript Over React

React Approach:

// React component
import React, { useState, useEffect } from 'react';

function Calculator() {
    const [amount, setAmount] = useState(0);
    const [result, setResult] = useState(0);

    useEffect(() => {
        calculateResult();
    }, [amount]);

    return (
        
    );
}
Enter fullscreen mode

Exit fullscreen mode



Advantages:

✅ No framework overhead
✅ No virtual DOM reconciliation
✅ Direct DOM updates (faster for simple UIs)
✅ No JSX compilation needed
✅ Anyone can read the code (no framework-specific patterns)



When React Would Win:

✅ Complex state management
✅ Many component re-renders
✅ Deeply nested component trees
✅ Team already knows React

For calculators? Vanilla wins.



2. Tailwind CSS via CDN (Not Compiled)

Controversial choice. Every Tailwind expert will tell you to use PostCSS and PurgeCSS to remove unused classes.
We use the full CDN version.
Why?