Better BMI Calculator
A BMI Calculator that shows your proximity to other BMI category
December 2021 — December 2021
Summary
A BMI Calculator that shows your proximity to other BMI category
Developer Diaries
Why I Made This
I created this simple website because I feel like most BMI calculators out there has one common function that they lack, they don't show how close you are to the neighboring BMI category. Suppose that I am categorized as normal, that's great. But I also would like to know whether I am borderline fat or borderline thin. By utilizing the Rechart library in a quite hacky way, I was able to visualize that proximity.
Custom Hooks
This is also my first time really trying out existing custom hooks and also making one myself for my use case. Because I wanted the BMI classification to be computed and presented after a certain delay after the user finished typing, I had to use useTimeout
and useDebounce
hooks that I learned in this very helpful video by Web Dev Simplified that nicely introduces one to custom hooks. I also had to make a custom hook for imperial height calculation because the height depends on two distinct parameters, feets and inches. This hook is creatively named useImperial
.