PHPnews.io

Overview for 'sebastiandedeyne'

Lessons from Atomic Habits

Written by Sebastian De Deyne / Original link on Apr. 8, 2021

Last year, I read Atomic Habits by James Clear. I first heard of James Clear during Justin Jackson’s Laracon 2019 talk in New York, when he quoted: Every action you take is a vote for the type of person you wish to become. No single instance will transform your beliefs, but as the votes build up,…



The window.matchMedia API

Written by Sebastian De Deyne / Original link on Apr. 5, 2021

To execute a piece of code when the viewport is a certain size, the first thing that comes to mind is adding a resize event listener to the window object. This is one way, but not always the best. Sometimes the lesser known window.matchMedia API is a better fit. This is the well-known way to trigge…



The Record type in TypeScript

Written by Sebastian De Deyne / Original link on Mar. 31, 2021

I can’t count the amount of times I’ve defined an object type with unknown string keys and a specific value type. type Scores = { [key: string]: number; } And despite using it all the time, I can’t for the life of me remember the [key: string] syntax. Today, my problems are solved. Apparently TypeS…