O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Removing ExpandableCell from AddExpensesModal

As the DatePickerAndroid and Picker components render as a modal on an Android device, I made some modifications to the AddExpensesModal component to remove the instances of ExpandableCell.

This resulted in a new Android-specific file because of the large number of changes. I removed the categoryPickerExpanded and datePickerExpanded properties in state, as well as the importing of DatePickerIOS and ExpandableCell:

 // .../app/components/AddExpensesModal/index.android.js ... import { DatePickerAndroid, ... } from 'react-native'; ... export default class AddExpensesModal extends Component { ... constructor (props) { super (props); this.state = { amount: '', category: undefined, date: new Date(), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required