Use states instead of pages.