News for hackers. Stuff that matters.
Re:React I love you, but you're bringing me down by nightski on Tuesday September 20, 2022 @04:13PM (#32917163)
I was just going off my own experience with React through the years. It was very hard to compose behavior with class based components. We had to create higher order components that had functions as children which could pass down data as arguments to the child function. It really made a mess of the component hierarchy. Now you can create reusable custom hooks that can be used from any component.
Re:React I love you, but you're bringing me down by skydhash on Tuesday September 20, 2022 @06:37PM (#32918713)
I agree with you. It's much better to have useAuth everywhere than having WithAuth capping every class.