Remove use of deprecated `view.state` property.

Closes #1824.