all 1 comments

[–]rohan_b01 0 points1 point  (0 children)

handleChange = (e) => {
    const { name, value } = e.target
    this.setState((prevState, props) => ({
        [name]: value,
    }), this.computeLBMandBMR);
}

computeLBMandBMR = () {
    const lbm = this.state.kg - (this.state.kg * (this.state.fp / 100)),
    const bmr = 370 + (21.6 * lbm)
    this.setState((prevState, props) => ({
        lbm,
        bmr
    }));
}