MRMauricio Robayoinblog.mauriciorobayo.com·Jul 23, 2021 · 1 min readJavaScript `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...00
MRMauricio Robayoinblog.mauriciorobayo.com·Jul 4, 2020 · 2 min readEffortless 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....00
MRMauricio Robayoinblog.mauriciorobayo.com·Feb 19, 2020 · 6 min read10x 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...00
MRMauricio Robayoinblog.mauriciorobayo.com·Feb 12, 2020 · 8 min readHow 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 ...06PNGZM
MRMauricio Robayoinblog.mauriciorobayo.com·Nov 11, 2019 · 7 min readCSS 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. ...00