---
search:
  exclude: true
changelog:
  category: Release
  version: 9.4.0
date: '2022-07-22T15:30:06Z'
seo:
  description: >-
    This release fixes
    https://github.com/thebuilder/react-intersection-observer/issues/572 It's
    now possible (not recommended) to use inline functions for ref…
title: v9.4.0
type: changelog
---
# [9.4.0](https://github.com/thebuilder/react-intersection-observer/compare/v9.3.5...v9.4.0) (2022-07-22)

This release fixes https://github.com/thebuilder/react-intersection-observer/issues/572
It's now possible (not recommended) to use inline functions for `ref` methods. This will still cause extra rerenders, but you will not get into a state of infinite loops. 

### Bug Fixes

* optimize re-renders in useInView ([a3e2be5](https://github.com/thebuilder/react-intersection-observer/commit/a3e2be51062af784f87d89ba7950ab83ea319b05))


### Features

* rewrite internals to use setState for `ref` ([776caa6](https://github.com/thebuilder/react-intersection-observer/commit/776caa6182826ea6735c8faed8691ab39312f16a))
