Skip to content

Deprecation warnings are showing up after updating to 0.54 #18165

Description

@jhnferraris

Since we updated to 0.54, we received a lot of deprecation warnings.

The reason that we updated was to address this issue. App works as expected, however, warnings are showing up.

Do we have a document or a website showing the full list of deprecations so we can act accordingly? Thank you!

Activity

  1. react-native-bot commented on Mar 2, 2018

    @react-native-bot
    Collaborator

    Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?

    You may safely ignore this if you believe your issue contains all the relevant information. Thank you for your contributions.

    How to Contribute • What to Expect from Maintainers

  2. changed the title [-]Deprecation warnings are showing up after updated to 0.54[/-] [+]Deprecation warnings are showing up after updating to 0.54[/+] on Mar 2, 2018
  3. hackdie commented on Mar 2, 2018

    @hackdie

    +1 Make release notes great again.

  4. gre commented on Mar 2, 2018

    @gre
    Contributor

    I'm also receiving a lot of deprecation warnings. I think those are great to make libraries do the changes as early as possible. however not so great for the end user app dev experience ('cause RN show the yellow warning in the App itself.. maybe they should only be displayed in the console for so called "lowPriorityWarning").

    Anyway, so if you are looking for a way to temporarily disable this as I am, I've figured you can do:

    require("ReactFeatureFlags").warnAboutDeprecatedLifecycles = false;
  5. gre commented on Mar 2, 2018

    @gre
    Contributor
  6. jhnferraris commented on Mar 2, 2018

    @jhnferraris
    Author

    @gre thanks dude!

  7. DimitryDushkin commented on Mar 5, 2018

    @DimitryDushkin

    Hey, @gre! Where did you placed warnAboutDeprecatedLifecycles = false thing? I've tried to put it in index.js with no luck. I've also restarted and reset cache for metro bundler.

  8. DimitryDushkin commented on Mar 5, 2018

    @DimitryDushkin

    I answer my own question. Because import is moved to the top of the compiled code I've rewritten it to require. So the code is:

    require('ReactFeatureFlags').warnAboutDeprecatedLifecycles = false;
    
    const {AppRegistry} = require('react-native');
    const App = require('./App').default;
    
    AppRegistry.registerComponent('iosapp', () => App);
  9. sameer421 commented on Mar 5, 2018

    @sameer421

    @DimitryDushkin I tried your fix but I am getting a weird error saying reducer is not a function:

    require("ReactFeatureFlags").warnAboutDeprecatedLifecycles = false;
    const React = require('react');
    const { AppRegistry } = require('react-native');
    const App = require('./src/containers/App').default;
    const rootReducer = require('./src/reducers/index');
    const { createStore } = require('redux');
    const { Provider } = require('react-redux');
    const store = createStore(rootReducer);
    const AppContainer = () =>



    AppRegistry.registerComponent('todoappnative1', () => AppContainer);
    console.log(store.getState());

    Can you check it what's wrong with my require usage?

  10. gre commented on Mar 5, 2018

    @gre
    Contributor

    @DimitryDushkin I have a separated file that I call polyfill.js, and in my entry point, i'll do import "./polyfill"; at first line. if it important it is the first import so there is not the problem you mentioned.

  11. sameer421 commented on Mar 5, 2018

    @sameer421

    @gre can you help me it's just very annoying.

  12. DimitryDushkin commented on Mar 5, 2018

    @DimitryDushkin

    @sameer421 if you have export default in reducers/index.js you should require('...').default;

    @gre oh, that's clever :)

  13. sameer421 commented on Mar 5, 2018

    @sameer421

    @DimitryDushkin Thanks it worked. Removed All my warnings.

  14. izikandrw commented on Mar 5, 2018

    @izikandrw

    in your AppRegistry file add an array of messages you want to ignore console.ignoredYellowBox = ['View #'] see http://www.joshualyman.com/2016/03/react-native-debugging-tips/ for more details

  15. gaearon commented on Mar 7, 2018

    @gaearon
    Collaborator

    These warnings got into the release in this state by accident. It wasn't intentional.

    Please follow this thread: #18175 (comment).

  16. locked and limited conversation to collaborators on Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions