Created
March 9, 2018 04:41
-
-
Save kstulgys/f0946fd3aff83f3bf365f2bda9fec195 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleChange = (e) => { | |
const { name, value } = e.target | |
this.setState((prevState, props) => ({ | |
[name]: value, | |
})); | |
const lbm = this.state.kg -(this.state.kg * (this.state.fp / 100)) | |
const bmr = 370 + (21.6 * this.state.lbm) | |
this.setState((aprevState, props) => ({ | |
lbm, | |
bmr | |
})); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment