-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I already added checks for mutation and serializability. The other category of things that often comes up is side effects in reducers. Had some ideas on that front tonight:
- https://github.com/angular/zone.js/ monkey-patches every source of async behavior in the environment, and lets you create "zones" that monitor async behavior. Per Section 5, Use Case 1.a in the "Zone Primer" doc, warning about async behavior is a perfectly valid use case for Zone.js
- The other similar concern is randomness. Obviously can't check for everything, but maybe look into monkey-patching
Math.random
the same way? (Was specifically helping someone in Reactiflux tonight who was generating random color values in a reducer.)
I figure I can turn this into another validation middleware. The biggest issue is that I can imagine someone putting some other async middleware after ...getDefaultMiddleware()
, and this one throwing errors because those happened while next(action)
was running.
wldcordeiro
Metadata
Metadata
Assignees
Labels
No labels