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

Haven't used mercury, but in react component state has it's uses. It's strongly recommended both in docs and mailing list that component state should only be used for ephemeral data, the data that losing is not a problem when the component unmounts.

For example, when implementing a dropdown menu with react, holding the dropdown menu's open/closed state in the component, and modifying it with onClick events is really convenient.



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

Search: