From 9864c3a0dfe0aeb0cd9633e9adb381a3388de9bf Mon Sep 17 00:00:00 2001 From: Steven Bapaga Date: Mon, 8 Aug 2016 05:42:05 +0100 Subject: [PATCH] Change getDefaultProps to ES7 property initialiazers for default props (#9241) and add PropType validation * getDefaultProps is not available in ES6 class style declaration --- docs/UsingNavigators.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/UsingNavigators.md b/docs/UsingNavigators.md index 16ef78f78..18bff8921 100644 --- a/docs/UsingNavigators.md +++ b/docs/UsingNavigators.md @@ -31,11 +31,12 @@ import React, { Component } from 'react'; import { View, Text } from 'react-native'; export default class MyScene extends Component { - getDefaultProps() { - return { - title: 'MyScene' - }; - } + static propTypes = { + title: React.PropTypes.string, + }; + static defaultProps = { + title: 'MyScene', + }; render() { return (