diff --git a/packages/routers/src/CommonActions.tsx b/packages/routers/src/CommonActions.tsx index 55b9ce7b..93f69c88 100644 --- a/packages/routers/src/CommonActions.tsx +++ b/packages/routers/src/CommonActions.tsx @@ -45,7 +45,7 @@ export function navigate(...args: any): Action { if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) { throw new Error( - 'While calling navigate with an object as the argument, you need to specify name or key' + 'You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions.html#navigate for usage.' ); } diff --git a/packages/routers/src/__tests__/CommonActions.test.tsx b/packages/routers/src/__tests__/CommonActions.test.tsx index 0d11c358..5d431fcf 100644 --- a/packages/routers/src/__tests__/CommonActions.test.tsx +++ b/packages/routers/src/__tests__/CommonActions.test.tsx @@ -3,6 +3,6 @@ import * as CommonActions from '../CommonActions'; it('throws if NAVIGATE is called without key or name', () => { // @ts-ignore expect(() => CommonActions.navigate({})).toThrowError( - 'While calling navigate with an object as the argument, you need to specify name or key' + 'You need to specify name or key when calling navigate with an object as the argument.' ); });