Repository navigation
Deprecation warnings are showing up after updating to 0.54 #18165
Description
Activity
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.
- addedRan CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.
on Mar 2, 2018 - 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 +1 Make release notes great again.
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;
Reacted by Vladimir Timofeev, Hanif Carroll, Zohaib Shahzad and Takuya MatsuyamaReacted by Meriadec PilletFor the list of deprecations you can probably already read https://medium.com/@baphemot/whats-new-in-react-16-3-d2c9b7b6193b and especially this RFC: https://github.com/reactjs/rfcs/blob/master/text/0006-static-lifecycle-methods.md
Reacted by John Michael Ferraris, Eric Kerr and Tho@gre thanks dude!
Hey, @gre! Where did you placed
warnAboutDeprecatedLifecycles = falsething? I've tried to put it inindex.jswith no luck. I've also restarted and reset cache for metro bundler.I answer my own question. Because
importis moved to the top of the compiled code I've rewritten it torequire. So the code is:require('ReactFeatureFlags').warnAboutDeprecatedLifecycles = false; const {AppRegistry} = require('react-native'); const App = require('./App').default; AppRegistry.registerComponent('iosapp', () => App);
Reacted by Alexey Bulavka and Chen@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?
@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.@gre can you help me it's just very annoying.
@sameer421 if you have
export defaultinreducers/index.jsyou shouldrequire('...').default;@gre oh, that's clever :)
@DimitryDushkin Thanks it worked. Removed All my warnings.
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 detailsReacted by DimitryThese warnings got into the release in this state by accident. It wasn't intentional.
Please follow this thread: #18175 (comment).
- locked and limited conversation to collaborators
on Mar 7, 2018 - addedResolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
on Mar 2, 2019
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!