Introduction
What is the Cookbook?
The cookbook is a place where you can find solutions for common cases needed in most of projects. It also contains some interesting examples of not so common, but interesting issues.
Imagine starting a new project that needs the most common mechanisms like, navbar with hamburger menu or expandable sidebar. Instead of starting from scratch and creating it again, or looking for a code in some of your previous projects why not have it all in one place, ready to use and adjustable enough to fit project-specific requirements.
This is why Cookbook was created.
See the basic concepts and rules below:
Independent recepies: each recipe should stand on its own. This means single recipe should focus on one specific use case. Recepies should not be coupled to each other and you should be able to extract required components with least effort required.
Proper explanation: each recipe should contain a code example and possibly step by step explanaition how to recreate a solution
Exploring the Ecosystem: cookbook is also a space where we can explore the libraries ecosystem in more depth.
Main goal
The Cookbook gives developers examples to work off of that both cover common or interesting use cases, and also progressively explain more complex detail. The main goal is to create first point of contact when looking for a solution for most common issues and give space for sharing more complex and unique solutions.
Recipes should generally:
- Solve a specific, common problem
- Start with the simplest possible example
- Introduce complexities one at a time
- Link to other docs, rather than re-explaining concepts
- Describe the problem, rather than assuming familiarity
- Explain the process, rather than just the end result
- Explain the pros and cons of your strategy, including when it is and isn’t appropriate
- Mention alternative solutions, if relevant, but leave in-depth explorations to a separate recipe