Added support for passing current app.state for view subsystem