Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

sebmarkbage
Copy link
Contributor

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.

@@ -10,6 +10,20 @@
*/
'use strict';

var warning = require('fbjs/lib/warning');
Copy link
Contributor

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')?

Copy link
Contributor Author

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.

@sophiebits
Copy link
Contributor

👍

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @nicklockwood, @sebmarkbage and @vjeux to be potential reviewers.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 11, 2016
get update() { return require('update'); },
get batchedUpdates() {
if (__DEV__) {
warning(

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.
@sebmarkbage
Copy link
Contributor Author

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

@sebmarkbage updated the pull request.

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.


if (__DEV__) {
var warningDedupe = {};
var addonWarn = function addonWarn(prevName, newPackageName) {

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.

Copy link
Contributor Author

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.

@ghost ghost closed this in 0b534d1 Apr 12, 2016
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
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
This pull request was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants