Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix react native warnings #309

Merged
merged 8 commits into from
Sep 3, 2019
Merged

Conversation

hanwencheng
Copy link
Contributor

@hanwencheng hanwencheng commented Aug 7, 2019

close #271 , closes #277

  • Remove all the componentWillReceiveProps, componentWillMount, componentWillUpdate method in our code base, whereas the warning with the dependency react-native-markdown-renderer. So I use React Native ignoreWarning method in the entry point of the app, i.e. App.js. in
    e036a5d

  • cc53f25 , a68295b Refactored QrView and AccountIcon component with React hooks.

  • 0df5839 DataDetail component is not used anywhere, and global styles.js file does not existed, so remove all of them.

  • 4fd58b7 : Remove another warning of the iOS Native code threading problem

@Tbaut
Copy link
Contributor

Tbaut commented Aug 7, 2019

Thanks a lot for that. We are re-factoring quite a lot with YJ right now in #293 and #279 and this will conflict quite a lot I suppose. I'll cherry pick your changes and add them to my branch, I think it'll be a headache otherwise.

@hanwencheng
Copy link
Contributor Author

I will merge this PR after these bigger ones are merged.

constructor(){
super();
if (__DEV__) {
YellowBox.ignoreWarnings([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it's a good idea to ignore them. I think it's ok to keep them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just annoying, have to click the dismiss button everytime, plus now we have cleaned our code and know that warnings only comes from the dependencies. Let's keep eyes on new code of componentWill* method, I think there is little probabilities that we will use these lifecycles methods since we now have React Hooks to use.

@@ -17,54 +17,35 @@
'use strict';

import PropTypes from 'prop-types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used hooks now in the substrate re-factoring for this file here: https://github.com/paritytech/parity-signer/pull/293/files#diff-4f18afcbf235db6a111ab00e2a6bee19L24

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Tbaut
Copy link
Contributor

Tbaut commented Aug 26, 2019

All the major PRs have been now so that this one can go in :)

@hanwencheng hanwencheng merged commit 9b2d57a into master Sep 3, 2019
@hanwencheng hanwencheng deleted the hanwen-deprecated-lifecycle branch September 3, 2019 22:21
@Tbaut
Copy link
Contributor

Tbaut commented Sep 3, 2019

Needs review before merging 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants