omcljs / om

ClojureScript interface to Facebook's React
6.66k stars 363 forks source link

Prevent re-rendering transactions that don't have read keys #822

Open julienfantin opened 7 years ago

julienfantin commented 7 years ago

A transaction that doesn't have any read keys will cause the entire app to re-render.

While this makes sense as a default, some transactions mutate state that's not rendered and we would like to have some way to override that behavior.

swannodette commented 7 years ago

It's worth considering whether we should have a flag that suppresses re-render from root if the queue is empty.

anmonteiro commented 7 years ago

We used to have ::skip which perhaps we can bring back to serve that purpose.