News for hackers. Stuff that matters.
Re:Show HN: A renderless and extendable rich-text editor for... by billconan on Saturday May 25, 2019 @10:10AM (#20009141)
Ya, I also could not understand why lifecycle is bad, because not only vue has it, other frameworks, like iOS sdk also has this concept.

And I have never had trouble using them.

I googled “lifecycle bad pattern. And found https://hackernoon.com/problematic-react-lifecycle-methods-a...

But I didn’t see it explaining why it is bad.

Re:Show HN: A renderless and extendable rich-text editor for... by revskill on Saturday May 25, 2019 @10:11AM (#20009150)
Lifecycle is not to be reused. Hooks could be reused and used everywhere you want.
Re:Show HN: A renderless and extendable rich-text editor for... by jeremyjh on Saturday May 25, 2019 @10:34AM (#20009285)
In Vue nothing prevents you from reusing a common function in or as a lifecycle method. I’m sure you think mixins are bad too, since Dan does, but you can also just use plain functions and bind this.
Re:Show HN: A renderless and extendable rich-text editor for... by revskill on Saturday May 25, 2019 @11:09AM (#20009451)
You're reusing a function, not a lifecycle.
Re:Show HN: A renderless and extendable rich-text editor for... by jeremyjh on Saturday May 25, 2019 @10:30AM (#20009267)
The react community has decided reacts implementation of lifecycle methods has some downsides. Every pattern has pros and cons, which may play out differently in different implementations.