dev.to dev.to

Comunicação entre iframes

Introdução Problema window.postMessage Recebendo o evento Enviando dado para o iframe Conclusão Introdução Iframes! Quando ouvimos falar sobre esse elemento parece que estamos voltando no tempo. Como naquelas páginas bonitas em que o menu chamava cada parte do site dentro de um desses elementos. Mas os iframes ainda existem, sempre vão existir, e servem para muitos propósitos. Há algum tempo eu tive que fazer...

dev.to dev.to

Angular Dependency Injection Simplified for .Net and Java Developers

Recently one of the .Net developer asked me the question "why we use class rather than interfaces while using Dependency Injection" the question was valid because as a .Net developer that was what we learned, Do not use or create a class instance directly. Introduction To be frank for me it's been more than a year I wrote .Net code, but I have written it for more than 8 years, I will copy the example from Microsoft...

dev.to dev.to

Indexing objects in TypeScript

This is a topic that comes up every now and again, so I figured it'd be useful to write a post about it. Imagine you have code like this: // an object defining how to display specific user statuses in the UI const statusDisplays = { online: 'Online', offline: 'Offline', busy: 'Busy', dnd: 'Do Not Disturb', } // fetch the status of a user by their ID const userStatus = getUserStatus(myUserID) // get the displayed status...

dev.to dev.to

Learning Should Be Fun: ReactJS + Twitch API Tutorial

How many todo apps and calculators does the world need? Learning to code is hard, which makes it tough to stay motivated sometimes. It doesn't help that most beginner tutorials are almost always the same rehashed projects that are not only boring to follow but won't help you get a job IMO the best way to learn is mixing together things you enjoy to create something new. One example would be combining programming with gaming...

dev.to dev.to

Building Sudoku in Vue.js - Part 2

Earlier this week I blogged about my attempt to build a Sudoku game in Vue.js. At the time, I felt like I had done a good majority of the work, but that I was at a good stopping point to write it up and blog. Well last night I “finished” the app (to be clear, there’s absolutely room for polish) and I’m kind of embarrassed at how little I had left to do. I’m going to assume I’m just far more intelligent than I think and am...