5 ms·
If you love super fast virtual DOM but don't want all the stuff that comes with react (including the learning curve), Vue's awesome. The same site has a bunch o
by nailer 11y ago
If you love super fast virtual DOM but don't want all the stuff that comes with react (including the learning curve), Vue's awesome. The same site has a bunch of other Vue tutes: http://coligo.io http://coligo.io
- pdog 11y agoReact itself is already pretty simple if you ignore all the extraneous tooling. The core API is just about a dozen lifecycle methods.
- recursive 11y agoIf you ignore the tooling, then you can't use JSX. If you can't use JSX, then I don't think React is that useful.
- k__ 11y agohave you looked into hyperscript and the hyperscript-helpers? there are versions that work with react.
- spriggan3 11y agoYou can't really code in React professionally if you ignore all the tooling around it, the pipelines , the JSX, the flux/redux/... and all that stuffs. It's like saying "C is pretty simple if you ignore gcc macros,make, autoconf, automake, autogen, pkg-config, ld , and all that stuff". You cant. All these dependencies are necessary and managing them constitute at least half the amount of time spent working with C. Same thing with React. So you pretty much end up with the same level of complexity as more complicated solutions in the real world context.
- KurtMueller 11y agoHaven't ignored JSX, but other than that, I use React in a professional context with the same tooling I use for jQuery.
- thkim 11y agoThat extraneous tooling killed React for me. React itself is simple and easy, I agree with that. But getting things wired up so that you can develop a real application? I think I lost a good day or two on it. Even after I was set up, honestly there were a lot of tweaks left such that I didn't really get to where I wanted to be. Also I can't really see where things might break down in between. It's enough to be frustrated with the code itself, let alone getting bogged down in a long, incomprehensible path along the build pipeline.
- KurtMueller 11y agoI've always thought of React itself as just one step up from jQuery. You don't need to use a router or flux to get use out of it.
- sotojuan 11y agoReact can be learned in a day. It's really simple. The tooling around it can get weird but honestly I think most people are exaggerating. It's fine.
- 8note 11y agoI second that. I learnt it/redux/react-router on Saturday.
- Omnipresent 11y agoWhat resources did you use?
- bdavisx 11y agoNot the OP, but I used egghead.io (subscription version) - the Redux stuff is completely free though and it's from the author of Redux himself.
- treehau5 11y agoBetween the egghead videos, the docs on the redux site itself, and looking at a couple boilerplate projects, it really didn't take long to grasp it. It will take you even shorter if you are aware of functional programming concepts such as reducers, pure functions, etc. The hard parts always figuring out what goes in the store and what you should just handle in your presentational components
- KurtMueller 11y agoJust the tutorial on their github page :)
- 8note 11y agoI grabbed a boilerplate[1] and read through it to produce a basic CRUD app for tracking mini libraries. mostly follow where the data flows through, and look up details on anything that looks like it could be doing a lot of stuff. the gyst is, you have your state [Redux store] which is updated through reducer functions. Each reducer tracks the state for its part of the system, and is called with an action name+data when the state should change. actions are called through a function, dispatch. it is typical to run a function as it's input, dispatch(makeAction()) where makeAction does things like make a REST request. the state object is passed into React components as state and properties, which you can use for rendering HTML. to receive them, you register what you want from the reducers, and it is automagically passed in, and you can pass properties down to child components as HTML looking markup. when something happens, like a user types into a text box, you call dispatch with the new text to be added to the state, which then gets reduced and passed into the next render call of the component, to update what's shown in the text box. specific to that codebase, containers are top level components. routing is done as a React component, where you render a tree of possible routes, pulling out variables as you go, to feed into the component/container leaves, and the matching route is rendered. [1] https://github.com/choonkending/react-webpack-node https://github.com/choonkending/react-webpack-node [2] https://github.com/jhedin/little-libraries https://github.com/jhedin/little-libraries
- scope 11y ago1. Vue uses the actual DOM not virtual DOM like react 2. BOTH react and Vue can be learnt in a day 3. BOTH can seem daunting when you're making production app (Vuex, redux, webpack, Vue-router, react-router...) So, I don't not agree with 'learning curve' that's thrown at React. Both Vue and React are amazing. If you want to use them properly, you as a developer has to spend the time to learn.
- JDDunn9 11y ago> 1. Vue uses the actual DOM not virtual DOM like react Facebook really should have named the Virtual DOM something different to avoid this confusion. The "Virtual DOM" is not an alternative to the DOM (which would be impossible), it is just a string diffing algorithm to minimize the number of DOM mutations required.
- nailer 11y ago1. My understanding is that Vue consolidates mutations in memory and applies the consolidated results resulting in less DOM churn. 2 and 3 are entirely subjective.
- leeoniya 11y agoAnd if you like pure js and something faster than Vue (by 25%) and smaller than Vue (by 80%), try domvm [1] (15kb with view core, router, isomorphism and mutation observers). Disclaimer: I'm the author. [1] https://github.com/leeoniya/domvm https://github.com/leeoniya/domvm
- Kiro 11y agoI had a look at some VueJS examples and the first thing I saw was this: <input type="radio" name="branch" :id="branch" :value="branch" v-model="currentBranch"> <label :for="branch">{{branch}}</label> I'm using React to avoid having to use a markup DSL (á la Angular), not because of the Virtual DOM. That's just a bonus.
- honua 11y agoYeah, that's exactly what made me turn around from using Vue as well
- mcbetz 11y agoAnother very good resource for learning VueJS is Laracasts' Learning Vue 1.0 - https://laracasts.com/series/learning-vue-step-by-step https://laracasts.com/series/learning-vue-step-by-step