What are the cons of Riot.JS?

devquora
devquora

Posted On: Feb 22, 2018

 

The main cons of Riot.JS are as follows:

  

  • State management is difficult: There are no ways to manage the state in a component or between the components. There are no steps between a state update and rend ender, and when there is need of updating a tag, all its children will be also be updated. This increases the need for plumbing each time the user adds complexity to a Riot. Alternatively, the user could implement another library like Redux to keep state, which has its implications as well as challenges.
  • Magic syntax: The Riot.JS development team made some odd choices when it comes to keeping to standards. There is some E56-like syntax, which is used in code examples that are not found elsewhere. Also, Riot.JS interprets user’s tag contents as JavaScript instead of HTML initially. For example, HTML attributes have no quotes.

The toggle function definition will throw an error in any program and there’s no <script> like tag around the JavaScript. Thus one can easily work around, but there is the possibility of a stumbling block for non-professional developers, which are bad for reusability of your code.

  • Not strict enough: An app, which is built with Riot is just a big object, residing in the global scope, that the user can easily traverse and change if necessary. Even the internals are accessible too. When the app goes through problems it becomes tempting to build hacks and workarounds using the features. There may be unexpected side effects because of this are all too common in Riot.JS.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Riot js interview questions

    What are the core concepts of Riot.js?

    The core concepts of Riot.js includes:HTML tags Loops Mixins Observables Routing Scoped CSS styles Yield (passing HTML..

    Riot js interview questions

    What are the pros of Riot.js?

    The main advantages or pros of Riot.js are as follows:Simple to learn– Riot is a very small framework with a size o..

    Riot js interview questions

    What is meant by Riot.Js loops?

    Riot.js has a special feature called the loop mechanism, which helps the users to generate HTML from large arrays of da..