side-effect
is a general term in computer science. In the context of an app, it means any interaction with the world outside of the internal logic of your app. Typical examples of a include API requests, analytics, logging, local storage, and so on.aperture
controls the streams of data which enter Refract.effect
values in response.effect
is any value, passed from an aperture
into a handler
. These can be any value: numbers, strings, booleans, etc - you get to decide how to structure your effects.effect
s will likely be plain JavaScript objects (or arrays of objects if you want to dispatch multiple effects simultaneously) - this works well for more complex apps.handler
causes side-effects in response to any effect
value output by the aperture
.setState
or Redux dispatch
for example), but could also include external side-effects which do not loop back into your app (such as localstorage or analytics).errorHandler
causes side-effects in response to any fatal error occurring within your aperture
.errorHandler
. Usually, you would be expected to log this error for further investigation.