day8 / re-frame

A ClojureScript framework for building user interfaces, leveraging React
http://day8.github.io/re-frame/
MIT License
5.4k stars 715 forks source link

Allow enrich to return nil #751

Closed NoahTheDuke closed 2 years ago

NoahTheDuke commented 2 years ago

If the function f passed to enrich returns nil, use the value for db that was given to f instead of setting the :db effect on context to nil, which results in all changes to db being discarded.

I've updated the docs, added two tests, and fixed the existing test for enrich that was accidentally a no-op.

Closes #750