3 ms·
It certainly does introduce side effects (by default, for Apollo or Relay): * A network request is kicked off if the cache doesn't contain the data the compone
by nevir 9y ago
It certainly does introduce side effects (by default, for Apollo or Relay):
* A network request is kicked off if the cache doesn't contain the data the component declares a dependency on.
* other components that depend on any part of the requested subgraph will update when the response comes in
* query observers (which HoC'd components really are) will similarly fire, potentially triggering other side effects in your application
- altano 9y agoIf you include enough in your definition of side effect, everything must have a side effect. Otherwise you wouldn’t be doing it. A pure function that adds two numbers and returns the result has left your system in a different state than it was in before it ran. Data binding has side effects and the implementation of the thing doing the binding may cause things to happen, may cause some state to change. But I still wouldn’t consider the declarative data binding itself to have side effects.