Hey there,
I liked your comparison, I think it's makes it easy for everyone to understand a little bit more about each framework :)
I have some additional comments, first two typos:
On your example of what a typical Vue file looks like, you have:
// code... <style lang="scss" scoped> .h1 { color: red; } </style>
There is a . (dot) left before h1 tag
.
h1
On the react code where you explain about template in JSX and styling in CSS-in-JS, you have:
// code... <div> <h1 style={styles.color}>{this.state.message}</h1> </div> // code... // CSS in JS const styles = { header: { color: 'red', }, };
You need to change the style={styles.color} to style={styles.header}
style={styles.color}
style={styles.header}
It might make sense to add a note to the Watchers and Observables topic, as we have been available since Vue 2.6.0+, a new behaviour for Observables.
Finally, the part where we have:
Vue requires you to declare a child component twice, once on import another on Components.
Is important to know that you can change this behaviour using lazy load/async components imports:
<!-- Vue Parent Component --> <template> <div> <child-component :message="message"/> </div> </template> <script> export default { data() { return { message: 'hello world', }; }, components: { ChildComponent: () => import('./ChildComponent.vue'), }, }; </script>
Thanks again for this comparison 🚀
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey there,
I liked your comparison, I think it's makes it easy for everyone to understand a little bit more about each framework :)
I have some additional comments, first two typos:
On your example of what a typical Vue file looks like, you have:
There is a
.
(dot) left beforeh1
tagOn the react code where you explain about template in JSX and styling in CSS-in-JS, you have:
You need to change the
style={styles.color}
tostyle={styles.header}
It might make sense to add a note to the Watchers and Observables topic, as we have been available since Vue 2.6.0+, a new behaviour for Observables.
Finally, the part where we have:
Is important to know that you can change this behaviour using lazy load/async components imports:
Thanks again for this comparison 🚀