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 Android

It's easiest for us to take the Android EditTask component from Chapter 2Advanced Functionality and Styling the To-Do List App, and make changes to it. Additionally, referencing the updated iOS version of this component during these changes can also help.

Specifically, for the Android version of EditTask, we want to do the following:

  • Swap out any references to the local state with the state tree made available via props
  • Replace any unnecessary calls to the local methods, dispatching actions instead
  • Keep the local methods for saving a task and opening both the date and time pickers
  • Update the callback that pressing the back button triggers, resetting the selectedTaskObject in addition to calling ...

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