Closed knod closed 5 years ago
As far as const
vs. let
, I had thought the pre-existing choice (which hadn't been implemented) was to use let
by default. I can't seem to find my notes on it now and I might be wrong about that.
I know it's something that needs more discussion. Is it a blocking change for this PR?
As far as
const
vs.let
, I had thought the pre-existing choice (which hadn't been implemented) was to uselet
by default. I can't seem to find my notes on it now and I might be wrong about that.I know it's something that needs more discussion. Is it a blocking change for this PR?
For me, this is blocking, it makes the code that was altered more fragile. Values like destructured props should not change, and really should always be declared with const.
@dylanesque : I hear you feel strongly about that. I'll change back the destructuring ones. If you want a change, though, it's often a good idea to comment on the relevant lines with a 'request changes' review.
Dang, also forgot to destructure some props in there!
Values like destructured props should not change
Did you mean destructured this.state
? I don't think I changed any destructured props.
Values like destructured props should not change
Did you mean destructured
this.state
? I don't think I changed any destructured props.
I meant "like" props, so state is similar enough in this example.
I don't understand why the const declarations here were changed to let.