mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 17:34:59 +08:00
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:
committed by
Satyajit Sahoo
parent
7c0fcc6cf5
commit
5f4c335e51
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user