DEV Community

Discussion on: What's wrong with this code?

Collapse
 
kepta profile image
Kushan Joshi

const is a good practice, but you even continue using let with immutable code. Sometimes itโ€™s easier and more readable to use let for an immutable object, to which you are going to apply transforms.

Collapse
 
joelnet profile image
JavaScript Joel

sure.

i just try my best to make everything immutable and handle mutable state separately, like in a redux store.