Code snippets are pieces of code that are written to perform specific tasks. They are useful for developers because they save time by providing pre-written code that can be reused and modified as needed. By using code snippets, developers can quickly create complex applications without having to write all of the code from scratch. Additionally, code snippets can help developers understand new concepts and technologies faster and more efficiently.
My 4 favorite sites for code snippets
2 min read
Here’s a list of my favorite code snippet list
30 seconds of code is a great source for short, concise code snippest for a variety of languages. This site has code snippets for React, Angular, Node.js, and more. Each code snippet is explained with a description and a link to the source code. This is a great resource for developers who want to quickly find snippets without having to search through large code bases.
Curated list by mazda.dev is a great collection of code snippets for modern JavaScript development. It includes code snippets for various topics, such as ES6 features, asynchronous programming, and more. Each code snippet is accompanied by a description and a link to the source code, making it easy to find the right code snippet for your needs. Additionally, this list provides a great overview of the latest and greatest ES6 features and how to use them.
Fireship.io is a great resource for developers looking for code snippets for web development. This site has snippets for React, Vue, Angular, and more. Each code snippet is explained with a description and a link to the source code. The code snippets are organized in a way that makes it easy to find the right code snippet for a specific task. Additionally, this site also includes a collection of tutorials and articles that can help developers understand the code snippets better.
If you haven’t heard about Fireship I recommend checking out his youtube channel, it’s the greatest youtube channel on coding ever.
I'm just starting out, so my collection of snippets is small. It's different from other snippet lists online, as some of them are full-fledged components that do a certain functionality. I'm especially proud of the "Upload an Image" snippet. It allows you to upload an image and creates a base64 version of it, which you can then save to any image hosting provider (I'm using Cloudinary, but I'm not sure if it works elsewhere).