Review of the documentation

Recently I read the full vue guide and I have some comments on it:

List rendering

https://vuejs.org/v2/guide/list.html

In this code example

example1.items = example1.items.filter(function (item) {
  return item.message.match(/Foo/)
})

I would write in the return statement

return /Foo/.test(item.message)

Here you just need the test methode. Test methode has a better performance (about 40%).
It’s even recommended in the MDN docs, s.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match
I made already a pull request on this issue in github and got the answer it’s usable. But I think it’s not usable if performance matters.

Transitions

https://vuejs.org/v2/guide/transitions.html

As a 3rd part animation library Velocity.js is mentioned. In former days Velocity.js was a good alternative to jQuery’s animations (think because old jQuery didn’t use requestAnimationFrame). But nowadays jQuery is as fast as Velocity and Velocity is not used by many. I would make instead an example with anime.js or GSAP.

Plugins

https://vuejs.org/v2/guide/plugins.html

I would remove ‘vue-touch’ as an example here, not maintained any more.

Single File Components

https://vuejs.org/v2/guide/single-file-components.html

I would remove preprocessor ‘Bublé’ here, not maintained any more.

General

Think it’s time to change to full ES6 Syntax in the JS code examples (use of methode definition shorthand, arrow functions…).

The Vue documentation is on github https://github.com/vuejs/vuejs.org/tree/master/src/v2/guide. You can make a pull request there.

For the first point of my review I already made a pull request, but the answer was not satisfying and I wanted to discuss it here.
Points about “Transitions” and “Plugins” need also a discussion, because we have to decide which animation framework we should use as an example and which plugin we mention instead of vue-touch.
For the point about single file components I will make a pull request.
The last point (switching to ES6 Syntax) needs also some discussion.

Just wanted to make a pull request, got this information in github

Note

We’re currently in the process of migrating Vue’s documentation to v3. To ensure smooth progress, only PR’s that fix critical bugs and/or misinformation will be accepted. If yours is not one of them, consider creating an issue instead and we will label it as post-3.0 for later tackling.

So I will create issues for my points.