3 ms·
> A pure function will return the same value for the same arguments every time. Yes, and given the same outputs provided by props + hooks, components will retu
by phailhaus 5y ago
> A pure function will return the same value for the same arguments every time.
Yes, and given the same outputs provided by props + hooks, components will return the same value. That's why you can write hooks functionally, and why we can do away with class-based functions entirely. With the exception of refs, there is no actual internal state that your component needs to deal with.