JavaScript `this` inside `setInterval`When the function is called, it is called using the new keyword. One of the things the new keyword does is that it "binds the newly created object instance as the this context". We can test the following snippet of code to verify the value of this wh...Jul 23, 2021 · 1 min readblog.mauriciorobayo.com
Effortless refactor with De Morgan's LawsI recently learned about De Morgan's laws by watching an informative video by the ProgramArtist about code refactoring: https://www.youtube.com/watch?v=lpB7PLSikw8 In the video he quickly mentions De Morgan's laws to simplify a section of the code....Jul 4, 2020 · 2 min readblog.mauriciorobayo.com
10x your code with the facade pattern, currying, and closuresDoing fetch requests is one of the most frequent tasks as a front-end JavaScript developer. If you are doing different fetch calls to different services on the same project, you might benefit from the facade pattern, currying, and closures. The Setup...Feb 19, 2020 · 6 min readblog.mauriciorobayo.com
How to hide your front-end API keysMost of web API services require the use of an API key or an access token to get authorization. The problem with this setup is that when you include your credentials with your front-end code, any user who understands the basics of HTTP and knows how ...6NNGFeb 12, 2020 · 8 min readblog.mauriciorobayo.com
CSS Grid IS a grid frameworkOn October 10, 1994, Cascading Style Sheets (CSS) were proposed to style online documents. But then the Internet exploded with web apps and devices, and CSS fell behind. It was not designed to layout complex user interfaces on multiple screen sizes. ...Nov 11, 2019 · 7 min readblog.mauriciorobayo.com