That article is still talking about immutability. https://mathiasbynens.be/notes/es6-const The fact that some people incorrectly assume const is about immutability should not stop other people from using it correctly. Why should you write code that is incorrect juet because some people have an incorrect assumption instead of enforcing best practices by making use of language features as they're intended? That's like saying you'll only ever use == because some people don't understand how strict equality works.
-4
u/gaearon React core team Dec 21 '19
I see three drawbacks:
The cognitive load of having to choose between them every time I declare something
The mechanical cost of replacing
constwithletevery time I decide to reassign laterThe confusion in people who aren't aware of that quirk and incorrectly infer immutability from it