refactor: remove local state in favor of Observable
Created by: beyang
Took @felixfbecker's suggestion from https://github.com/sourcegraph/sourcegraph/pull/5457#discussion_r323346545
Created by: beyang
Took @felixfbecker's suggestion from https://github.com/sourcegraph/sourcegraph/pull/5457#discussion_r323346545