---
search:
  exclude: true
changelog:
  category: Release
  version: 8.22.0
date: '2019-03-11T21:34:13Z'
seo:
  description: >-
    Previously, the initial callback would trigger a state update, even if the
    element was still outside the viewport. This update changes the behavior, so
    it…
title: Rework some internals
type: changelog
---
## Potential breaking change #195 

### Change for the `<InView>`
Previously, the initial callback would trigger a `state` update, even if the element was still outside the viewport.
This update changes the behavior, so it won't trigger new state update before the element enters the viewport.

If you used the `IntersectionObserverEntry` during that first callback, it will no longer work. The use case for this, is most likely to determine if the element started outside the viewport.

#### Workaround
As a workaround, you can use the `onChange` callback, since this will still be called everytime.
