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

Modifying the EditTask component for iOS

Next, we will modify the EditTask component. It should:

  • Be nearly identical to the EditTask component we had at the end of Chapter 2Advanced Functionality and Styling the To-Do List App, with both an Android- and iOS-specific version
  • Replace any methods that manipulate data with the actions that we can dispatch to the state tree

Since datePickerHeight is set during the onLayout event of DatePickerIOS, we will keep it in the local state:

 // TasksRedux/app/components/EditTask/index.ios.js import React, { Component } from 'react'; import { Button, DatePickerIOS, Switch, Text, TextInput, View } from 'react-native'; import ExpandableCell from '../ExpandableCell'; import styles from './styles'; export ...

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