chore(views): improve static analysis in river views

It feels so strange that these need to come after the variable declaration. Is that really the only way?