Closed garyhuntddn closed 6 months ago
Hey!
Totally get what you are saying, we typically have the convention to only use const
in top-level module scope and everything else is let
.
This is one is leaning to one of those subjective matters where some people prefer const
some let
, some people prefer semicolons some don't, some prefer tabs some spaces, some prefer named exports some default exports and so on.
We basically picked a convention that is consistent throughout the codebase. The good part is that once you copy the components in your project you can choose the conventions you want.
I think we will keep it like this for now, but if more people want this change then we can definitely revisit this.
Hope this helps!
Lots of the catalyst components - e.g. table.tsx
Describe the bug It's considered normal practice to use const instead of let if a variable is not going to be changed. Eslint has picked up a number of places in the catalyst components where this isn't the case.
To Reproduce Steps to reproduce the behavior:
Expected behavior That variables defined as let are changed after they are initially declared, and if they aren't then they should be declared const.
Additional context Just trying to suggest some improvements to the code as it's going to be code that we include in our own projects