JavaScript Tutorials
Get React Component Data by DOM Node
Retrieving a React component's DOM node is fairly simple from within the component itself, but what if you want to work backward: retrieve a component's instance by DOM node? This is a task that the old Dojo Toolkit's Dijit framework allowed with the
dijit.byId
method, so...How to Get a React Component’s Element
JSX is an amazing pseudo-language for React, and if I'm honest, it's what brought me to love React so much. Using React without JSX is cumbersome and frustrating, while using JSX is such an easier way to express your code. One drawback of JSX, however, is...
React and autofocus
While I love ReactJS, I can say that I sometimes find interactions that were easy during the pre-ReactJS are annoyingly difficult or at least "indirect". One example is properly ensuring that a given
<input>
element gets focused when a button in a different component is clicked; in...The Dark Side of Promises
Since the release of es6 many new features have found their way into NodeJS, but non had quite the same impact as promises. Promises have been developed for the browser before es6 was even a thing. There were several implementations that have been used like jQuery's...
Destructuring and Function Arguments
The JavaScript language has benefitted from some really awesome new features over the past few years, including arrow functions, the spread operator, and default function argument values. Even if your browser doesn't yet support proposed JavaScript API syntax additions, you can use a tool like...
5 Crucial Concepts for Learning d3.js and How to Understand Them
You may have already heard about d3.js, the dazzling JavaScript library that lets you create beautiful charts and graphics with just a few lines of code. You might have seen some of the fantastic examples of D3 in action, or you may have heard that...
React Video Player
Streaming entertainment is a massive interest of mine as both a consumer and web developer. My love for streaming entertainment dates back to the early days of RealPlayer and the misery of a million codecs. Fast forward to today and I'm working a lot with ReactJS...
Force a React Component to Re-Render
The beauty of React components is that they automagically render and update based on a change in
state
orprops
; simply update the state from any place and suddenly your UI element updates -- awesome! There may be a case, however, where you simply want to...How to Create a Twitter Bot with Node.js
Twitter bots have been in the news over the past few years due to election meddling, not only in the United States but stretching across the globe. There are, however, good and logical reasons for creating Twitter bots. In order to see how easy it was...
Using Storybook with Nuxt
Nuxt.js has been a lot of fun to use in production web apps and side projects. It's simple, fast, and seems very in line with web standards when it comes to creating components, importing plugins, etc. Equally as exciting has been the rise of...