Live data from Hacker News

What Hooks Mean for Vue

css-tricks.com

1–4 of 4 posts

Re: What Hooks Mean for Vue

#2
This led me to ranting drunkenly at Dan Abramov, and nobody wants that.

I wish I was at that party.. But seriously, do hooks allow for components to act more like state machines? I'm gathering that from this:

Hooks achieve what mixins do, but avoid two main problems that come with mixins:

    -They allows us to pass state from one to the other.
    -They make it explicit where logic is coming from.
*

Re: What Hooks Mean for Vue

#4
post #2

This led me to ranting drunkenly at Dan Abramov, and nobody wants that. I wish I was at that party.. But seriously, do hooks allow for components to act more like state machines? I'm gathering that from this: Hooks achieve what mixins do, but avoid two main problems that come with mixins: -They allows us to pass state from one to the other. -They make it explicit where logic is coming from. *

In my opinion, they are mixins that can be applied without subclassing a component. In the examples a new section, data.width, is added. This modifies the state schema of the component.