In this article, we look at some of the more advanced features of TypeScript, like union types, conditional types, template literal types, and generics. We want to formalize the most dynamic JavaScript behavior in a way that we can catch most bugs before they happen. We apply several learnings from all chapters of TypeScript in 50 Lessons, a book we’ve published here on Smashing Magazine late 2020. If you are interested in learning more, be sure to check it out!
Read more…
The promise of seamless design to code translation goes back to the early WYSIWYG page builders. Despite the admirable goal, their biggest flaw was the code that they generated. Skepticism remains to this day and whenever this idea reappears, the biggest concerns are always related to the quality and maintainability of the code. In this article, Miroslav Bekyarov will show you how to turn our static designs into a live, code-based prototype with real fields, forms, maps, and animations, and in turn, transform this prototype into React code — all integrated into one tool.
Read more…
How to stay creative, focused, and organized when working remotely? In this article, Cosima Mielke has compiled some useful tools and resources to help you tackle some of the challenges of working remotely. The collection is by no means complete, but rather a selection of things that we found useful and that we hope will make your day-to-day work more productive and efficient, too.
Read more…
Catch up on what’s been cookin’ at Smashing and explore some of the most popular community resources featured in our newsletter over the past few weeks. Spoiler: there are also new workshops, front-end & UX audits and truly smashing podcast episodes. This article covers pretty much everything you need to build fast experiences on the web today — from metrics to tooling and front-end techniques and strategies.
Read more…
If you have used Redux at any point while developing an application to manage state, you will most definitely have come across reducers. In this tutorial, Fortune Ikechi will show you the concept of reducers and how they work, specifically in React applications. In order to understand and better use Redux, a solid understanding of reducers is essential. Reducers provide a way to update an application’s state using an action. It is an integral part of the Redux library.
Read more…
The 2019 Capgemini research institute’s report published after a research on the use of chat assistants showed a drastic 76% increase in customer satisfaction from organizations where chat assistants where built and incorporated into their services. But how does Dialogflow, a product from Google’s ecosystem, aid developers in building chat assistants and contribute to this quota?
Read more…
Markdown is a powerful markup language that allows editing and formatting in plain text format that can then be parsed and rendered as HTML. It has a declarative syntax that is both powerful and easy to learn for technical and non-technical folks. However, due to the consequential ambiguities in its original specification, there have been a number of distinct flavors (or custom versions) that aim to erase those ambiguities as well as extend the original syntax support. This has led to a steep divergence from what can be parsed and what is rendered. CommonMark aims to provide a standardized specification of Markdown that reflects its real-world usage.
Read more…
Even though the development of a data importer is a complex matter, you don’t want your users’ experience with it to be just as complex or complicated. The second they experience any friction or fault in data onboarding, the chances of them bailing from the software will skyrocket. So, in this post, we’re going to focus on how best to present your data importer to users.
Read more…
Copy docs is a framework that allows product designers and writers to manage their in-product copy in a smart way. In this article, Valeriia Panina shares her experience in how the copy docs technique turned out to be a game changer for her workflow. The copy docs technique was a game changer for Valeriia’s workflow and she’d be happy if it boosts yours, too!
Read more…
In JavaScript, there are two main ways to handle asynchronous code: then/catch (ES6) and async/await (ES7). These syntaxes give us the same underlying functionality, but they affect readability and scope in different ways. In this article, Bret Cameron will show you how one syntax lends itself to maintainable code, while the other puts us on the road to callback hell!
Read more…