Remove use of deprecated `view.state` property.
Merge pull request #1826 from rwjblue/do-not-use-state

Remove use of deprecated `view.state` property.