Exploring design patterns for Explore page pagination functionality.
Expected backend behavior (right now):
One API call to get the options/checkboxes.
Actual page titles and descriptions are static on the frontend.
Current thinking:
In componentDidMount(), make that one API call.
Create a new class, ExplorePage, that will store titles, descriptions, checkboxes (and their selected/unselected state).
These objects will be stored in an array in order of appearance. The only thing relating to these pages in state will be currentPageIndex. Upon this, the screen will load the correct data and their checkbox selection states.
componentDidMount()
, make that one API call.ExplorePage
, that will store titles, descriptions, checkboxes (and their selected/unselected state).currentPageIndex
. Upon this, the screen will load the correct data and their checkbox selection states.