entranic-architecture's People
entranic-architecture's Issues
Choosing a frontend framework - React or VueJS
React and Vue share many similarities. They both:
- utilize a virtual DOM
- provide reactive and composable view components
- maintain focus in the core library, with concerns such as routing and global state management handled by companion libraries.
Differences btw React and VueJS
Jsx vs Templates
React uses jsx templates eg
render () {
let { items } = this.props
let children
if (items.length > 0) {
children = (
<ul>
{items.map(item =>
<li key={item.id}>{item.name}</li>
)}
</ul>
)
} else {
children = <p>No items found.</p>
}
return (
<div className='list-container'>
{children}
</div>
)
}
Jsx has a number of advantages:
- You can use the power of a full programming language (JavaScript) to build your view.
- The tooling support (e.g. linting, type checking, editor autocompletion) for JSX is in some ways more advanced than what’s currently available for Vue templates.
VueJS uses html style templates.
<template>
<div class="list-container">
<ul v-if="items.length">
<li v-for="item in items">
{{ item.name }}
</li>
</ul>
<p v-else>No items found.</p>
</div>
</template>
The above html style templates gives a number of advantages:
- Fewer implementation and stylistic decisions have to be made while writing a template
- A template will always be declarative
- Any valid HTML is valid in a template
- It reads more like English (e.g. for each item in items)
- Advanced versions of JavaScript are not required to increase readability
Which is easier to reason about and be used with html preprocessors eg jade(pug). - View supports render functions and Jsx if needed.
- You can use html preprocessors(eg jade) to author vue templates.
Learning Curve
VueJS is more intuitive and has an easier learning curve unlike React which is more abstract with a steep learning curve.
Popularity
React is very popular and is backed by tech giant facebook while on the other hand, vueJS has rising popularity.
Check out this link for more indepth comparison.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.