UNPKG

@ou-imdt/create

Version:

Command line tool to create team boilerplate.

25 lines (18 loc) 1.11 kB
# VUE Component Checklist Use this checklist to ensure that your component is well designed and follows the the component guidelines. - [ ] use options API. - [ ] component, props naming; PascalCase. - [ ] use underscore for private/internal only methods and props e.g. _foo, _bar. - [ ] pass content using `<slot>` element where possible. - [ ] component CSS in a separate `[component].css` file. - [ ] make sure a test file, `[component].test.js` is included. ## Good practices ### What makes a good component? - It has a single responsibility. - It has its own state. - It has its own lifecycle. - It has its own template. - It has a well-defined public API. ### Passing data up and down the tree - *Properties down*. Setting properties on a subcomponent is usually preferable to calling methods on the subcomponent. - *Events up*. In the web platform, firing events is the default method for elements to send information up the tree, often in response to user interactions. This lets the host component respond to the event, or transform or re-fire the event for ancestors farther up the tree.