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

Upgraded to RN 0.60.5 #4

Merged
merged 2 commits into from
Oct 9, 2019
Merged

Conversation

markmadlangbayan
Copy link

I tried to use the existing PR, but there were issues. It was using the ListView's DataSource, and feeding it to FlatList's data property. I tried, but I was just getting a blank modal screen. After attempting to fix it, I came up with a totally different solution.

These are the changes:

  • Completely migrated to FlatList without using any deprecated ListView code.
  • Removed warning suppression about ListView
  • Fixed warnings
    • Used getDerivedStateFromProps() instead of componentWillReceiveProps(); causing blank modal.
    • Fixed warning about “VirtualizedList: missing keys for items, make sure to specify a key property on each item or provide a custom keyExtractor.” by specifying keyExtractor.
    • Changed package.json from dependencies to peerDependencies. It was causing ambiguous errors about React when trying to develop.
    • Updated React version that's compatible with 0.60.5.
  • Replaced example and replaced it with default template from 0.60.5 and then copied over the example from App.js.
  • Modified the example to write to the console instead of alert. It was throwing an error about Window Hierarchy. This might be some sort of race condition when the modal is trying to dismiss and at the same time an alert is being shown. Sometimes it will display the alert, but just make the whole screen unresponsive. I think it maybe be covering the alert box by the Modal. Anyway, it may not be part of the actual library itself.
  • Just minor typo in example (Custome).

Mark Madlangbayan added 2 commits September 4, 2019 12:42
- Migrated from deprecated ListView to FlatList
- Migrated componentWillReceiveProps to getDerivedStateFromProps
- Fixed warning about “VirtualizedList: missing keys for items, make sure to specify a key property on each item or provide a custom keyExtractor.” by specifying keyExtractor.
- Changed package.json from dependencies to peerDependencies.
- Updated react version.
- Used react-native init example and just copied over App.js and some package.json.  This way it will be as close to the recommended 0.60.5 package dependencies.
- Used console.log instead of alert as an example.  It was causing issue where modal is presented and at the same time an alert is invoked.  There seem to have a raising condition that’s not directly related to the library itself.
- Found a typo; minor.
@bhavik66 bhavik66 merged commit 091cd46 into binbytes:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants