Skip to content

locofocos/anything-ratio-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Anything ratio calculator

View this at https://locofocos.com/anything-ratio-calc/

This calculator allows you to input arbitrary ratios (like for a cooking recipe, a home improvement project, whatever) and then scale the recipe up and down.

It's helpful because you can change any resulting value. For example, suppose you have a cake recipe that needs 4 cups of flour, but you only have 3.5 cups of flour. This will scale all the other ingredients accordingly.

It's a single-page application built with React and basic HTML elements. The deployment is literally just serving up a static HTML and JS file with modern-ish JS syntax (may the odds be ever in your favor, IE 10 users). It uses React hooks because that's how I like expressing the logic. If this paradigm interests you, you may be interested in commit 3e3fe18 as a barebones template.

Development

To run the project locally, you'll hit a CORS error simply opening the file in your browser. Bypass this by using any plain web server, like python3 -m http.server then hit http://localhost:8000/

Deployment

Github pages will automatically host the contents of the master branch.

About

React app to input ratios (like a recipe) then scale it up and down

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors