react native updating options with setoptions

JavaScript
/* Inside of render() of React class */
<Button
  title="Update the title"
  onPress={() => navigation.setOptions({ title: 'Updated!' })}
/>
Source

Also in JavaScript: