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…
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…
This article is the first part of an upcoming series that provides a practical introduction to Dependency Injection in a manner that immediately permits you to realize its many benefits without being hampered down by theory. Today, Jamie Corkhill will depict only a very practical example of dependency injection in use and mostly neglect the theoretical attributes. He does it this way in order to make it easier to understand what dependency injection is at its core in a manner divorced from the rest of the complexity that people usually associate with the concept.
Read more…
Vuex is the go-to state management library for Vue applications, and the Vue core team has some big plans to make it better than ever. Vuex 5 will work more like a composition API alternative but keeps all the benefits of using an official state management library. In this article, Joseph Zimmerman will take a look at what will be changing.
Read more…
MDX gives you the minimalist ergonomics of Markdown with the flexibility of custom components. By combining MDX with Sanity and Next, you can build robust, team-friendly content editing experiences while keeping the pleasant and efficient developer experience of building Jamstack sites with React.
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…
In the product-focused world of development, it can be easy to forget the joy of making for the sake of making. By dropping the ‘Why’ and ‘How’, and focusing instead on the ‘What’ of weird, wonderful ideas, you can nurture a totally different side to your skill sets. You can read the docs, you can follow the tutorials, but wouldn’t you be more motivated by trying to make something unique, something no one else has seen before? Here’s how having fun can supercharge your learning. Throw a record on, pick a mood, and let’s get to it.
Read more…
The Vue Testing library can help you to test your applications by mirroring the way that a user would interact with them. Here’s everything you need to know if you want to get started right away. In this article, Kelvin Omereshone will look at testing Vue applications using the Vue Testing Library — a lightweight library that emphasizes testing your front-end application from the user’s perspective.
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…
In a React component, useState and useReducer can cause your component to re-render each time there is a call to the update functions. In this article, you will find out how to use the useRef() hook to keep track of variables without causing re-renders, and how to enforce the re-rendering of React Components.
Read more…