In this article, we’ll look at how to create an outside focus and click handler with React. You’ll learn how to recreate an open-source React component (react-foco) from scratch in doing so. To get the most out of this article, you’ll need a basic understanding of JavaScript classes, DOM event delegation and React. By the end of the article, you’ll know how you can use JavaScript class instance properties and event delegation to create a React component that helps you detect a click or focus outside of any React component.
Read more…
An introduction to building a Discord bot using the Discord.js module. The bot will share random jokes, assign or revoke user roles, and post tweets of a specific account to a Discord channel. In this article, Subha Chanda will showu you how to build a bot from scratch using JavaScript and with help from Discord.js. He’ll cover the process from building the bot up to deploying it to the cloud.
Read more…
In this article, we take a look at the topic of context and variables in Hugo, a popular static site generator. You’ll understand concepts such as the global context, flow control, and variables in Hugo templates, as well as data flow from content files through templates to partials and base templates.
Read more…
DevTools is very advanced and helpful, but can also be very intimidating and overwhelming. Let’s fix that. In this article, Vitaly reviews useful features and shortcuts for debugging in Chrome, Firefox, Edge and Safari.
Read more…
Adding video to your application can increase customer engagement and satisfaction. But the exact opposite can occur when there are issues with the video playback: video stalls are frustrating and drive customers away. In this article, Doug Sillars will walk you through the steps to optimize the video on your website to ensure fast playback and reduce stalls.
Read more…
A couple of weeks ago, we organized a Form Design Masterclass, an online workshop with Adam Silver alongside 81 friendly and smart people. Today, Adam Silver shares his experience and details by highlighting what you as an attendee can expect from a Smashing Workshop, and things to keep in mind when running one.
Read more…
Git has so many powerful features under the hood! From Interactive Rebase to Submodules and from the Reflog to File History, these advanced features help you become more productive and make fewer mistakes. In this article, Tobias explores some of the less known but very useful features in Git. You’ll learn how to recover deleted commits, clean up your commit history, use submodules to manage third-party code and compose commits with precision — along with a friendly Git cheat sheet.
Read more…
We use abstractions and conventions to hide away the tricky and error-prone parts, which in turn makes it easier for everyone who needs to do the same task. The ideas Steven Frieson shares here should be actionable in most applications depending on your styling solution and browser support. Migrating to use this system is not very risky since stacking contexts are already scoped individually; you can migrate one context as it already exists at a time.
Read more…
On your list of places where people might access your web app, Teams is probably number “not-on-the-list”. But it turns out that making your app accessible where your users are already working has some profound benefits. In this article, Tomomi Imura and Daisy Chaussee will take a look at how Teams makes web apps a first-class citizen, and how it enables you to interact with those apps in completely new ways.
Read more…
The present and future of CSS are very bright indeed and if you take a pragmatic, progressive approach to your CSS, then things will continue to get better and better on your projects, too. Some of the really handy powers CSS gives you might have slipped you by, so in this article, Andy Bell will take a look into masonry layout, :is selector, clamp(), ch and ex units, updated text decoration, and a few other useful CSS properties.
Read more…