Ensure getState function context is view