Now that you have the basics of ListView
components, and passing them DataSource
instances, let's add some controls to the list you just implemented. The ListView
component itself helps you render fixed-position content for list controls. You'll also see how to manipulate the data source itself, which ultimately drives what's rendered on the screen.
Before we jump into implementing list control components, it might be helpful if we go over the high-level structure of these components so that the code has more context. Here's an illustration of the component structure that we're going to implement:
Here's what each of these components is responsible for:
ListContainer
: The overall container for the list; it follows the familiar React container patternList
: A stateless component that passes the relevant pieces of state into theListControls
and the React NativeListView
componentListControls
: A component that holds the various controls that change the state of...