DEV Community

Calie Rushton
Calie Rushton

Posted on

1

Things I learned last week (23/24)

  1. Oftentimes, if you are working in VSCode and encounter a typescript error that doesn't makes sense and you can't fix it, pressing cmd + shift + p and selecting "Developer: Reload Window" is enough to make it go away!!

  2. Memory leak - "an unintentional form of memory consumption whereby the developer fails to free an allocated block of memory when no longer needed." In real terms it's like constantly buying new lip balms because you keep losing or misplacing the old ones. They're still out there somewhere!

  3. CSS: Grid looks at the container of elements to determine layout, while Flex concerns itself with the individual element to determine it's behaviour - good to know for the mental model and understanding what might be some of the limitations of Flex depending on your use case.

  4. Typescript: Discriminated unions - a union of different types which all share a common property - the 'discriminant'. The remainder of each type can be composed of different kinds of properties so long as it has the discriminant property, which might then be used as a condition in a function, for instance calculating the area of a shape type.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more