I've been trying to use various apps for code snippets managment.
In the end none of them worked well for me and I was still finding my self writing the same code like "new react component" over and over again.
I've decided to create new "project" that just includes well-named, ready to copy-paste code snippets I can quickly copy
- Clone this repo
yarn install
(it's just for typescript typings right now)- Open this project in new window of your IDE
- When you need snippet, switch your IDE window, find needed snippet and copy it
Feel free to add new snippets to this library.
Rules:
- Good practices
- Formatting matching settings in prettier config file
- Generic solutions - snippets should not be adjusted to your personal, specific and non-common needs
- Name files extremely well. Name should include all the aspects of what's included in the snippet
- If file includes jsx/tsx - use proper file extension
- use camelCase or PascalCase depending on what's included in the snippet.
- If file includes class/react component etc - use PascalCase
- If it's just some functional utility - use camelCase