5 ms·
To me Vue is a great tool for side projects. In React I found myself struggling to figure out what libs to use and keep myself up to date with them. I also hate
by octref 10y ago
To me Vue is a great tool for side projects. In React I found myself struggling to figure out what libs to use and keep myself up to date with them. I also hated configuring webpack. With Vue, I have officially supported libraries like vuex and vue-router which work great with Vue out of the box. vue-cli also allows me to scaffold projects with these libraries very easily.
But the thing I like most about Vue is it allows me, who identifies as a front-end dev or design-coding hybrid, to quickly iterate and build prototypes. Look at the single file component:
<template>
<div id="list">
<li></li>
<li></li>
</div>
</template>
<script>
export default {
// Define your component
}
</script>
<style scoped>
#list { list-style: none }
</style>
I can quickly edit the template to alter my component's DOM structure, style it with scoped css, and change its dynamic behavior in the script tag. Like the suite of Jade/Coffee/Stylus? Adding a lang attribute to each tag and you are good to go. Awesome stuff.
- blahbap 10y agoBut is it use limited to side projects in your opinion?
- octref 10y agoNo, it is solid for production and a lot of large Chinese companies like Alibaba, Baidu, Xiaomi, DJI use it.
- shriek 10y agoWait, Vue doesn't need to be transpiled to JS like JSX? I'm equally hating configuring webpack. It's lack of documentation isn't helping either.
- sotojuan 10y agoWhy aren't you using create-react-app?
- Aldo_MX 10y agoWhy should you? I mean, it is really handy to have a tool to save you from the initial setup and all that boilerplate code when you already know how it works. But not knowing how the different pieces fit together will bite you when things start to fail.
- shriek 10y agoPrimarily because we're gonna need webpack anyway (using it as build tool in the project) and started before create-react-app started. It's been quite a while but I still don't fully grasp webpack yet.
- slig 10y agoAfter "wasting" a few hours watching webpack tutorials and reading tons os blogs about, I think I finally grasped it. But then I discovered that there's already a new tool that's cooler than webpack: rollup [1]. [1]: http://rollupjs.org/ http://rollupjs.org/