Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

useState is the built-in way to manage state in React today. There were also similar mechanisms in class components before hooks came along. This is pretty integral to how React works.

People do add state managers to store state outside the component tree, but a lot of components don't need that.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: