Skip to content

Commit

Permalink
More helpful description for native-js prop mismatch
Browse files Browse the repository at this point in the history
Summary:
A lot of people see this error and end up posting in our support group. The root cause is that their js and native versions are out of sync. Adding a helpful description here will unblock them on their own.
Closes facebook#5605

Reviewed By: svcscm

Differential Revision: D2878376

Pulled By: martinbigio

fb-gh-sync-id: 10dedbdbb4bee3fce5119367223ebb42a3c1b6a4
  • Loading branch information
vjeux authored and facebook-github-bot-0 committed Jan 29, 2016
1 parent 1154f2a commit 54e5033
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Libraries/ReactIOS/verifyPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ function verifyPropTypes(
viewConfig.uiViewClassName + '.' + prop + '` of native type `' +
nativeProps[prop] + '`';
};
message += '\nIf you haven\'t changed this prop yourself, this usually means that ' +
'your versions of the native code and JavaScript code are out of sync. Updating both ' +
'should make this error go away.';
throw new Error(message);
}
}
Expand Down

0 comments on commit 54e5033

Please sign in to comment.