NativeBase: PropTypes error with react 16

native-base should make use of prop-types package instead of React.PropTypes

react-native: 0.45.1 react: 16.0.0-alpha.13 native-base:2.1.5

With the latest alpha versions of react, they completely removed React.PropTypes, and my code does not work

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Cool @shivrajkumar! Will run a few more tests with the branch on my fork and submit the PR.

@sankhadeeproy007 thanks! I have created a PR that fixes this https://github.com/GeekyAnts/theme/pull/2

hey @sebandres yesterday @shivrajkumar actually released version 2.3.1 of NativeBase which has the fixes for package.json to use the correct dependencies.

To clarify the dependencies:

  • native-base-shoutem-theme: uses 0.2.1 which has my PR
  • react-native-drawer: they pulled my PR to the master, but it doesn’t look like they do releases any more, so we’re stuck with just the master branch.
  • react-native-keyboard-aware-scroll-view: no release yet, so still the master branch.
  • shoutem/animation: NativeBase does not use this dependency anymore

Status of the dependencies that fail on React 16 and or RN0.46.1:

  • native-base-shoutem-theme: pulled changes and released version 0.2.1 with the fix.
  • react-native-drawer: pulled @sean-macfarlane changes but hasn’t released a new version.
  • react-native-keyboard-aware-scroll-view: has the fixes in master but needs to publish a new version.
  • shoutem/animation: waiting for PR to be pulled with fixes.

This Branch has a working version of NativeBase with the above ‘pending changes’ hardcoded on the package.json, feel free to comment if anything is not 100%!

Once all fixes are applied I’ll update the versions of the packages to remove the direct reference to the repos/branches.