What is the Riot.js?

Asked

Viewed 461 times

4

I was reading about some frameworks and libraries for front-end UI development and came across the Riot.js.

Giving a quick read on page of the library (in English), I concluded superficially that they promise to facilitate the componentization of the UI through their library.

Then the doubts arose:

  • As there are already several libraries/frameworks with similar purpose (Angular, React, Vue, etc.) what would be the motivations to choose Riot.js?
  • The "custom tags" they offer do not break web standards?
  • What would then be an overview of the library?

2 answers

2


Clearly stated in the documentation, Riot was inspired by Facebook’s React. Their proposal is to have simple syntax, and to be light - lightness is an audacious point to touch, because if the lightness in question is in the performance of the library is a challenge for them to compete with React, mainly due to the best view, for me, of Facebook - the Virtual DOM.

Riot has Express Binding, which basically stores created expressions in an array, and each expression has a pointer to the node in the DOM. Obviously, discussing the structure of updating elements in the DOM tree is a subject for another lunch (or post), but it is important to pay attention to this, because what most differs the direct competitor of Riot is the structure of componentization and Virtual DOM.

And Riot is basically this, a library with simpler syntax than its similar ones, which has a special attention in working with templates and which has tried/tries to solve React holes.

  • You would have an example of what would be a "scoop" in React that Riot solves?

  • 1

    Complex syntax and not human readable. Need a lot to create, for example a SPA. Riot promises to deliver the "same" result for less, knowing he’s using only the necessary.

1

As there are already several libraries/frameworks with similar purpose (Angular, React, Vue, etc.) what would be the motivations for themselves choose Riot.js?

This depends on the project, Riot.Js is very light and makes it much easier to create a template, now if you need something that needs to work side by side with the back-end React would not be a good solution compared to other frameworks

The "custom tags" they offer do not break web standards?

Edit: Generating new tags leaves the framework depedent html, impossible to exchange framework, there is no standard break but a new standard implemented.

What would then be an overview of the library?

Generate template more easily.

and has a good comparison well summarized on some frameworks here: https://nurelm.com/front-end-soup-react-polymer-riot-ember-angular-aurelia/ material in English

  • 1

    If the custom tags do not break the standards of the Web, how they would hinder the development, since they are part of the standard and every developer will have knowledge about?

  • I also had this doubt, as they fit the standards of W3C?

  • 1

    @BrenoCosta https://www.w3.org/TR/custom-elements/

  • Interesting! Thank you @Andersoncarloswoss

  • "Web pattern" not being related to naming, at the moment you create a new collection of names automatically you are making a new pattern. The negative of this is the depedence in the framework making it impossible to exchange.

  • I edited my answer on the pattern

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.