In this recipe, we will create a custom container element with a title and content. When a user presses the title, the content will collapse or expand. This recipe will allow us to explore the LayoutAnimation API.
Expanding and collapsing containers
Getting ready
Let's start by creating a new app. We'll call it collapsable-containers.
Once we have created the app, let's also create a Panel folder with an index.js file in it for housing our Panel component.
How to do it...
- Let's start by focusing on the Panel component. First, we need to import all...