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

"Imagine if a Redux reducer could dispatch further actions." I use a technique called "actors" that are like non-UI components that listen to store events and dispatch additional actions if necessary, using setTimeout so they're pushed to the end of the event loop.

Some pedants online continually claim this - or something like it - is an "anti-pattern" but I'm trying to get stuff done, and this is the way to do it.



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

Search: