Local mutations are all right
Published on in Clean code and JavaScript
For example, mutating a reducer function's accumulator array can be better than religiously avoiding mutations and returning only new arrays from the reducer.
Published on in Clean code and JavaScript
For example, mutating a reducer function's accumulator array can be better than religiously avoiding mutations and returning only new arrays from the reducer.
Published on in Clean code, Documentation and Markdown
A paragraph per line, a sentence per line, or hard wrapping at e.g. 80 characters? These days I prefer a fourth option: semantic line breaks.
Published on in Clean code, JavaScript and React
Last updated on
A multi-site React project has likely two kinds of components: common components and site-specific components. There are a few ways to handle site-specific logic in common components.
Published on in Clean code, CSS and JavaScript
Last updated on
These two similar principles state that the behavior of code should be obvious on inspection and that code should be located where it's relevant.
default
doesn't have to be the last casePublished on in C#, Clean code, JavaScript and TypeScript
Last updated on
Non-last default
cases are confusing
but perfectly valid.
Sometimes it makes sense to place them at the beginning or in the middle.