Thanks Raghav,
I didn't understand the question. With const DAY_IN_MILLISECONDS = 3600 * 24 * 1000; we're performing the calculations one time and that constant can be used multiple times now. And we can definitely have a better comment around it.
I believe that what Raghav meant was, if you put this variable in an kind of component that calculation will be done every time that i use the component.
Thanks Raghav,
I didn't understand the question. With
const DAY_IN_MILLISECONDS = 3600 * 24 * 1000;we're performing the calculations one time and that constant can be used multiple times now. And we can definitely have a better comment around it.I believe that what Raghav meant was, if you put this variable in an kind of component that calculation will be done every time that i use the component.
use this:
Oh. Yeah, definitely. This should most likely be in a constants file or something. You're right.