Skip to content

Update Riot comparison #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 12, 2017
Merged

Update Riot comparison #1203

merged 3 commits into from
Oct 12, 2017

Conversation

MartinMuzatko
Copy link
Contributor

@MartinMuzatko MartinMuzatko commented Oct 10, 2017

* Animation - this is no longer true, they have https://github.com/riot/animore
* Routing - the router API has been extended to allow for subroutes and parameters like Vue supports.
@MartinMuzatko
Copy link
Contributor Author

MartinMuzatko commented Oct 10, 2017

I'm not sure if one can see the more loosely defined expressions in Riot as an advantage or disadvantage.
I however, found that it is a lot simpler to do bindings in riot. <todo-list text={text}> vs <todo-list :text="text">.

Riot is generally more flexible and requires less syntax to learn. Same for event handlers:
<div onclick={action}></div> vs <div @click="action"></div>

However. One advantage to note, would be, that the event handling in Vue has more benefits (e.g. @keyup.enter or @click.prevent, and even @click="doSomething()" etc) which is the developers job to do.

What I like about Vue, is that actions can be used for both DOM events and events within the business logic.

It is a very common need to call event.preventDefault() or event.stopPropagation() inside event handlers. Although we can do this easily inside methods, it would be better if the methods can be purely about data logic rather than having to deal with DOM event details.

@chrisvfritz
Copy link
Contributor

Thanks! I removed the last advantage added for Vue, simply because there are many, many ways that Vue's API offers more convenience and I worry it can sound like nit-picking when we don't highlight small little features of Riot that may offer an advantage over Vue.

@chrisvfritz chrisvfritz merged commit 4ac328f into vuejs:master Oct 12, 2017
kazupon pushed a commit to kazupon/vuejs.org that referenced this pull request Nov 24, 2017
* Added links for AOT and tree-shaking. (vuejs#1159)

* Update Riot comparison (vuejs#1203)

* Update date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants