- 인스턴스 프로퍼티 추가하기
- Form Validation
- Editable SVG Icon Systems
- Create a CMS-Powered Blog
- Unit Testing Vue Components
- Creating Custom Scroll Directives
- Debugging in VS Code
- Using Axios to Consume APIs
- Avoiding Memory Leaks
- Client-Side Storage
- Packaging Vue Components for npm
- Dockerize Vue.js App
- Practical use of scoped slots with GoogleMaps
쿡북 vs 가이드
쿡북과 가이드는 어떻게 다른가요? 왜 이것이 필요한가요?
더 나은 집중 가이드에서는, 기본적으로 스토리를 기반으로 서술합니다. 각 섹션은 이전 섹션에서 얻은 지식을 가정해서 구성되어 있습니다. 쿡북에서는, 각 레시피들이 독립적으로 구성되어 있습니다. 그것은 레시피가 일반적인 개요를 제공하기보다 Vue의 특정 관점에 집중할 수 있다는 것을 뜻합니다.
Greater Depth: To avoid making the guide too long, we try to include only the simplest possible examples to help you understand each feature. Then we move on. In the cookbook, we can include more complex examples, combining features in interesting ways. Each recipe can also be as long and detailed as it needs to be, in order to fully explore its niche.
Exploring the Ecosystem: For advanced features, we assume some ecosystem knowledge. For example, if you want to use single-file components in Webpack, we don’t explain how to configure the non-Vue parts of the Webpack config. In the cookbook, we have the space to explore these ecosystem libraries in more depth - at least to the extent that is universally useful for Vue developers.
What we’re looking for
The Cookbook gives developers examples to work off of that both cover common or interesting use cases, and also progressively explain more complex detail. Our goal is to move beyond a simple introductory example, and demonstrate concepts that are more widely applicable, as well as some caveats to the approach.
If you’re interested in contributing, please initiate collaboration by filing an issue under the tag cookbook idea with your concept so that we can help guide you to a successful pull request. After your idea has been approved, please follow the template below as much as possible. Some sections are required, and some are optional. Following the numerical order is strongly suggested, but not required.
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
We request that you follow the template below. We understand, however, that there are times when you may necessarily need to deviate for clarity or flow. Either way, all recipes should at some point discuss the nuance of the choice made using this pattern, preferably in the form of the alternative patterns section.
- Articulate the problem in a sentence or two.
- Explain the simplest possible solution in a sentence or two.
- Show a small code sample.
- Explain what this accomplishes in a sentence.
Details about the Value
- Address common questions that one might have while looking at the example. (Blockquotes are great for this)
- Show examples of common missteps and how they can be avoided.
- Show very simple code samples of good and bad patterns.
- Discuss why this may be a compelling pattern. Links for reference are not required but encouraged.
Demonstrate the code that would power a common or interesting use case, either by:
- Walking through a few terse examples of setup, or
- Embedding a codepen/jsfiddle example
If you choose to do the latter, you should still talk through what it is and does.
It’s extremely helpful to write a bit about this pattern, where else it would apply, why it works well, and run through a bit of code as you do so or give people further reading materials here.
When To Avoid This Pattern
This section is not required, but heavily recommended. It won’t make sense to write it for something very simple such as toggling classes based on state change, but for more advanced patterns like mixins it’s vital. The answer to most questions about development is “It depends!”, this section embraces that. Here, we’ll take an honest look at when the pattern is useful and when it should be avoided, or when something else makes more sense.
This section is required when you’ve provided the section above about avoidance. It’s important to explore other methods so that people told that something is an antipattern in certain situations are not left wondering. In doing so, consider that the web is a big tent and that many people have different codebase structures and are solving different goals. Is the app large or small? Are they integrating Vue into an existing project, or are they building from scratch? Are their users only trying to achieve one goal or many? Is there a lot of asynchronous data? All of these concerns will impact alternative implementations. A good cookbook recipe gives developers this context.
It takes time to contribute to documentation, and if you spend the time to submit a PR to this section of our docs, you do so with our gratitude.