React (software): Difference between revisions

Content deleted Content added
Line 204:
 
'''Separation of concerns.''' React code mixes html with javascript, which is considered a bad practice as it makes more difficult to read and maintain the code, also hard to implement static code analysis.
 
'''Code verbosity.''' In order to perform model-view changes with component states and immutable objects, React require additional lines of code for a task achievable with a single statement in plain javascript. <ref>{{Cite web|title = React-Redux Verbosity|url = https://games.greggman.com/game/react-and-redux-are-a-joke-right/|website = games.greggman|accessdate = 2017-11-15}}</ref>
 
'''Single source of truth.''' Due to a mythical slowness of the browser's DOM engine compared with processing a similar (but lighter) tree on javascript, React creates, updates and diffs own virtual DOMs (second sources of truth for the User Interface), wasting CPU cycles (even when processing separately from the UI thread).