diff --git a/docs/versions/unversioned/guides/push-notifications.md b/docs/versions/unversioned/guides/push-notifications.md index 1fd0752f1b3af3..3cdc4aff86a62b 100644 --- a/docs/versions/unversioned/guides/push-notifications.md +++ b/docs/versions/unversioned/guides/push-notifications.md @@ -92,14 +92,15 @@ import { View, } from 'react-native'; -import registerForPushNotificationsAsync from 'registerForPushNotificationsAsync'; +// This refers to the function defined earlier in this guide +import registerForPushNotificationsAsync from './registerForPushNotificationsAsync'; export default class AppContainer extends React.Component { state = { notification: {}, }; - componentWillMount() { + componentDidMount() { registerForPushNotificationsAsync(); // Handle notifications that are received or selected while the app