Written content to help you along your web development journey, without forgetting to have some fun along the way.
In some cases, you may want multiple references in a component of unknown quantity. Here’s how you can make it work.
Add some flair to a simple tab solution by adding an animated bottom border.
This is a trick to running commands that you don’t want to be saved in your history.
The foundation for a tab system begins with a state hook, triggered by clicks on tab elements. View the code snippet and use the playground to see it in action.
Exit clauses can help you write less code and make your code more readable. Here is a simple example, along with some additional tips.
Toggle between preview and code mode when viewing a markdown file in GitHub.
There are more and more tools out there that let you build things (that aren’t websites) with code. Like Remotion for making videos with React. It’s super cool. But should you use it?
Component state doesn't change when navigating between dynamic routes in Next.js that use the same component. useEffect can help.
Shortcuts, patterns, and other ideas that I use every day and that I also don’t see many others using.
Dynamic property maps are a super powerful paradigm in JavaScript, but they can be tricky to type correctly with TypeScript.