Hacker News new | comments | ask | show | jobs | submit login

The issue if I understand your comment correctly is that you want to keep the ui state in sync with the logical state, so you can't just keep it in an object somewhere, since that wouldn't keep up with react's rendering?

I do think you can have a hook return a javascript object though for the normal reasons of encapsulation and such.

Applications are open for YC Summer 2019

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