6 ms·
Ask HN: Did you switch from React to Vue last year due to the licensing dilemma?
If you did, are you considering switching back to React? How is your experience with Vue? What does Vue do better than React? What does React do better than Vue?
- CharlesMerriam2 9y agoWe had to suspend React development. I think one team decided to switch from browser based to a native app, the other team is back on React.
- joshribakoff 9y agoI'm switching from Vue to React because I find it really kludgy to have to call Vue.set to declare new reactive properties at runtime. Its also a bit nicer in that React tends to follow ES standards like ES6 classes for components, instead of exporting a POJO for your component. In vue you often have to use function() instead of fat arrow syntax because of the context of "this". With react you used to have lots of .bind(this) boilerplate, but now we have shorthand property syntax. Vue also mixes props & state, where as React keeps them separate. React implements certain lifecycle methods like componentShouldUpdate() whereas Vue doesn't because the creator thinks it would complicate the API, meanwhile there's known issues like between Vue.js & HTML5 content editable due to this lack of lifecycle method. Vue is easier to get going & much faster to develop in initially, lower learning curve, and friendlier API.
- AlfeG 9y ago> I'm switching from Vue to React because I find it really kludgy to have to call Vue.set to declare new reactive properties at runtime. Why You need to do this that often? We have a lot of moving parts in app, but just a few `Vue.set` calls.
- truetuna 9y agoCould you expand a bit on shorthand property syntax or provide a link to somewhere I could read more? I'm still doing a lot of .bind(this) in many places and I'm looking for an alternative.
- eschutte2 9y agohttps://babeljs.io/docs/plugins/transform-class-properties/ https://babeljs.io/docs/plugins/transform-class-properties/ https://www.fullstackreact.com/articles/use-property-initializers-for-cleaner-react-components/ https://www.fullstackreact.com/articles/use-property-initial...
- lwansbrough 9y agoIsn't `something = () => {}` just a property declared as an anonymous function? Or is there more going on under the hood? At first glance this looks like a poor choice for debugging purposes.
- joshribakoff 9y agowell the alternatives I know of were to call .bind(this) all over the place, or wrap your handlers in a fat arrow wrapper function which is also an anonymous function as you say. I think this is the nicer of the options, and Vue.js is similar but you provide a hash of functions keyed by name, which is basically the same thing just different syntax. This nice thing about React is it doesn't matter. You can just write functional components if you don't want the es6 class stuff.
- eschutte2 9y agoThe important thing is that the ES7 property initializer with the arrow syntax binds the function's "this" to the instance.
- lwansbrough 9y agoI understand that, but that’s not necessarily acceptable if it makes debugging a nightmare. Apparently there is also a bind decorator, which I think is nicer than either of the other methods, because it is explicit but also clear, and without the verbosity.
- CaveTech 9y agoMost of this is simply incorrect. Declaring properties at runtime is an antipattern. You never need to use function() Props and state are absolutely not mixed. Props are inherited and immutable by default. Content editable doesn’t fit in with the vue paradigm but you can easily abstract that section out of vuejs. If you dom is not dictated by your data, then a render function makes little sense.
- joshribakoff 9y ago> Declaring properties at runtime is an antipattern. That's a pretty bold statement & I won't argue, but either way that's an opinionated decision of the framework. React is less opinionated & doesn't care what you use for your state. Vuejs is opinionated, they don't care about working well with Redux or other state management libraries because they already have their own, Vuex, which is pretty nice for the most part. > Props and state are absolutely not mixed a prop called "foo" & data/state param called "foo" are both accessed at this.foo, its no longer obvious what would happen if I would try to mutate this.foo. It mutates the data/state, not the prop, so now this.foo refers to the value in the data/state, which has a different value from the prop "foo" which can no longer be accessed at this.foo > You never need to use function() See this page which says "Don’t use arrow functions ": https://vuejs.org/v2/guide/instance.html#Data-and-Methods https://vuejs.org/v2/guide/instance.html#Data-and-Methods > you can easily abstract that section out of vuejs. Yeah you can, by not using vuejs. React has escape hatches to get out of your way, so you could continue to use it in that scenario thats part of why im switching back from vuejs to react.
- CaveTech 9y ago> a prop called "foo" & data/state param called "foo" are both accessed at this.foo, its no longer obvious what would happen if I would try to mutate this.foo. It mutates the data/state, not the prop, so now this.foo refers to the value in the data/state, which has a different value from the prop "foo" which can no longer be accessed at this.foo Well yes, but have props and state with the same name is again just code smell. > See this page which says "Don’t use arrow functions ": This is a very narrow restriction and pretty obvious why you shouldn't do it, ie it passes a context that makes no sense. This is not a Vue limitation. > React has escape hatches to get out of your way So does Vue, don't use the Vue `render` if Vue isn't managing the state.
- jackaroe78 9y agoYes, we had been planning to switch from Angular 1.x to React but our legal team determined it was too risky. The licensing issue was cleared up (I think) right after that decision was made
- throwaway2016a 9y agoThat is really a shame. React is hugely better than Angular 1.x in just about every way in my opinion. When we switched productivity went through the roof and the site rendered faster. That's not actually why I switched though. I switched because of the whole mess with Angular 2.x planned lacked of backwards compatibility. It was the nail in the coffin for Angular for me.
- Badb 9y agoSubject: ATTENTION: Kronos Banking Trojan: Working on MSIE,FF,Chrome, and MSIE EDGE! ATTENTION: Kronos Banking Trojan: Working on MSIE,FF,Chrome, and MSIE EDGE! ~~~~!!!!!!~~~~~~ ATTENTION: Kronos Banking Trojan: Working on MSIE,FF,Chrome, and MSIE EDGE! ~~~~!!!!!!~~~~~~ Kronos 32/64bit rootkit b Kronos has been updated and better than ever! Issues with Chrome crashing and not properly grabbing and injecting data have been fixed. FireFox grabbing and inject have been fixed. MSIE EDGE support for grabbing and injecting has been added. A few stability fixes have also been established. Price is $3,500 FIRM via Bitcoin. Socks5 module and usb spreader and cc grabber module for this advertisement will let go for $3k each. Useful contacts for smooth operations are given upon purchase. Crypting is available, servers are available, botnet management, any service you need you can obtain. Contact: ATMCARD@jabber.org (this is the only authorized contact. DO NOT TRUST ANY OTHERS!) Link: [EMV SDK Software for sale,the software is able to read write emv credit/debit cards sda/dda costum emv digital certificat full support Subject: Salle shell code, VNC bots online CC+VBV FULL INFO+VNC,PP+VNC, exploit, Injector Salle shell code, VNC bots online CC+VBV FULL INFO+VNC,PP+VNC, exploit, Injector Sale , shell code,VNC Soft, VNC bots online CC+VBV VNC +FULL INFO,PP+VNC, CA,DE,USA,EU MIX,AU,NZ,ASIA, 0day exploit, Inj3ct0r, VNC Module Connection through HVNC or mstsc Shell code , 0day exploit, Inj3ct0r All purchases on the site are available without registration, information is provided in automatic mode , wait for one transaction confirmation, after payment. Check transaction https://blockchain.info/ru https://blockchain.info/ru All the panels on our servers. Vendor Forum deposit 19000$ Contact English support Jabber: Atmcard@jabber.org Russian support Jabber: Atmcard@jabber.ru http://s15.zetaboards.com/club101201 http://s15.zetaboards.com/club101201 http://abdeyaz.mysite.com/index.html http://abdeyaz.mysite.com/index.html Two vouchers to join cashiers @Mafiozomazaf.IRC/darkn.. http://1xx2xx.offtopic.su/ http://1xx2xx.offtopic.su/ Register now and login to chat and deal based on your choice, money back guarranteed !!. http://s15.zetaboards.com/club101201 http://s15.zetaboards.com/club101201 Beggers Are not welcomed on my forum , http://atm1xx2xx.freeforums.net/ http://atm1xx2xx.freeforums.net/ http://chipemv201.forum2x2.ru/ http://chipemv201.forum2x2.ru/ Atmcard@jabber.org Perfectly Customize 201s writter software to work with. Making use of the 201s instead of 101s Black empty customized chip cards Exploits!! Higher special bins to work in your area Your software cant write 201s? Here is the solution with my Universal software. http://s15.zetaboards.com/club101201/index http://s15.zetaboards.com/club101201/index Best deal ever !! EMV 201s writter which works universal with ACR,38 OMNIKEY,MCR200,ACR92 etc Software asking price $20,000.00 USD Accept only BTC/WMZ..... Au101201pin.icyboards.net/ http://i65.tinypic.com/160on46.jpg http://i65.tinypic.com/160on46.jpg http://i63.tinypic.com/2j41p1z.jpg http://i63.tinypic.com/2j41p1z.jpg http://i64.tinypic.com/2m4wvg4.jpg http://i64.tinypic.com/2m4wvg4.jpg http://i63.tinypic.com/2mhykh0.png http://i63.tinypic.com/2mhykh0.png http://i63.tinypic.com/9rliz6.jpg http://i63.tinypic.com/9rliz6.jpg http://i64.tinypic.com/2mrigcg.png http://i64.tinypic.com/2mrigcg.png http://i66.tinypic.com/282dwmt.jpg http://i66.tinypic.com/282dwmt.jpg http://atm1xx2xx.freeforums.net/ http://atm1xx2xx.freeforums.net/ : Track1: %B5141541000xxxxxx^NEMETH/MICHAEL^1808101xxxxxxxxxxxxxxxxxxxxxxxx? Track2: 5141541000163693=1808101xxxxxxxxxxxx :Track 3: B5188xxxxxxxxxxxxxxxxxxxxxxx PIN: 0941 Time: 10.12.2017 04:55 pm format Before Decode 1=990000200000000000000?\1c12A10B11 C12B11\1c12000000002600\1c126964<0:22;725644\1c\1c0100\1c\1c29001100000000000000000000 < 4\1c000\1c\1c232\1c00000000\1c90015000075\0f@@\1c800 > 22\1c000\1c\1cB Format after Decrypt. arrow: Record #005529... Tue xx 16 08:46:05 20xx B4730994xxx011596^HAxxxMARxx B^xx011010000000000000515200012200000000 47309xxx0011596=xx01101000515200012200 Track 3:???xxxxxxxxxx PIN: 72xx NOTE/OTR CHAT ONLY WILL BE ANSWERED!! NO OTR WILL BAN NOTE/ Extra services and bonuses for RUssia Carders for cashout service.. NOTE/ Russia carders to contact me for cashout deals, must be Russia citizens only Atmcard@jabber.org icq 611588027 Admin Icq- 440588964 Sorry spam, mass message free pin test with valid PIN Track 1/2: %B5331572716170888^UNEMBOSSED/NAME^22091211160800000483000000?;5331572716170888=22091211160800000483? 2501 search this live chat and meet me there ICQ Group chat http://australia101-201.boards.net/board/3/mafiozo http://australia101-201.boards.net/board/3/mafiozo
- electric_sheep 9y agoNope, our legal dept gave us the OK on the original license.