if (Array.isArray(previous) && Array.isArray(next)) {
    return previous.length !== next.length
      || previous.some((p, i) => !equals(p, next[i]));
  }