News for hackers. Stuff that matters.
Re:Introducing Hooks by mhink on Thursday October 25, 2018 @05:00PM (#18304540)
I think people are getting too hung up on the "implicit ordering" thing. The only thing that really matters about the ordering of hooks is that the call pattern remains stable between render passes. This code:

    const [foo, setFoo] = useState("abc");
    const [bar, setBar] = useState("123");
...is functionally the same thing as

    const [bar, setBar] = useState("123");
    const [foo, setFoo] = useState("abc");
The feature is _declarative_ in the same way element rendering is declarative.
Re:Introducing Hooks by tln on Thursday October 25, 2018 @08:47PM (#18305907)
Couldn't useState accept a name? How would React DevTools or another debugging tool know the name of a piece of state?
Re:Introducing Hooks by nathancahill on Friday October 26, 2018 @12:18AM (#18306759)
I'm at ReactConf right now and I've been asking everyone this exact question.