Closed wozitto closed 7 months ago
This project seems to using tabs typically, but I don't really mind when 2 space is relatively standard in Javascript and this is only documentation
@dcousens Indeed, whether it is Tab or 2 space is a trivial difference. However, since "Real-world example:" uses 2 space, I think it would be better to unify them for the sake of document consistency. And at least to me it looks cleaner to use 2 space. 👀
I think this is a good thing to land, first and foremost because our documentation already uses inconsistent indentation in code examples. Secondarily because be default GitHub indentation for tabs is quite wide.
1. Changed code space from tab to two spaces
The space in the code block has been replaced by a tab from two spaces in the PR here. When I look at the space with tabs in preview, I feel the space is too wide, so I will change it back to two spaces.
Current preview
Preview after changes
2. Changed
let
declarations toconst
declarations in the "Dynamic class names with ES2015" exampleSince the
const
declaration has been available from ES2015, I have used it to maintain consistency with other implementation examples.