-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add deprecation warnings to ReactNative.addons #6927
Conversation
@@ -10,6 +10,20 @@ | |||
*/ | |||
'use strict'; | |||
|
|||
var warning = require('fbjs/lib/warning'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not doing require('warning')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I got burnt on that before. React Native have to use fbjs for some reason.
👍 |
By analyzing the blame information on this pull request, we identified @nicklockwood, @sebmarkbage and @vjeux to be potential reviewers. |
get update() { return require('update'); }, | ||
get batchedUpdates() { | ||
if (__DEV__) { | ||
warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dot-notation: ["batchedUpdates"] is better written in dot notation.
These were moved out into individual packages in React 0.14. Exceptions are batchedUpdates and TestModule that are already reachable on the ReactNative exports.
672c891
to
00c8b51
Compare
@facebook-github-bot shipit |
@sebmarkbage updated the pull request. |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
|
||
if (__DEV__) { | ||
var warningDedupe = {}; | ||
var addonWarn = function addonWarn(prevName, newPackageName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-shadow: 'addonWarn' is already declared in the upper scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a reason we use this pattern. Sigh.
Summary:These were moved out into individual packages in React 0.14. Exceptions are batchedUpdates and TestModule that are already reachable on the ReactNative exports. Closes facebook#6927 Differential Revision: D3166243 Pulled By: sebmarkbage fb-gh-sync-id: f696c84eda3cda522c91ec2ca584f5dde2e01407 fbshipit-source-id: f696c84eda3cda522c91ec2ca584f5dde2e01407
These were moved out into individual packages in React 0.14.
Exceptions are batchedUpdates and TestModule that are already reachable
on the ReactNative exports.
Test plan:
Created a HelloWorld project and added some dependencies on ReactNative.addons because there doesn't seem to be any in my grep.