Minor fix in the "Screen Navigation Options" sample (state undefined) (#41)

The current code as it was, depended on the "state" param, but the title was being defined as a string template literal.
This commit is contained in:
Gustavo Machado
2017-01-27 14:42:42 -03:00
committed by Satyajit Sahoo
parent 7c0fcc6cf5
commit 5f4c335e51

View File

@@ -95,7 +95,7 @@ class ProfileScreen extends React.Component {
static navigationOptions = {
title: `${state.params.name}'s Profile!`,
title: ({ state }) => `${state.params.name}'s Profile!`,
header: ({ state, setParams }) => ({
// Render a button on the right side of the header