rn-range-slider icon indicating copy to clipboard operation
rn-range-slider copied to clipboard

Fix ViewPropTypes warning

Open ajenkins opened this issue 3 years ago • 3 comments
trafficstars

After upgrading to React Native 0.68, I started seeing this warning: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Personally, I don't love the suggested solution, but I don't know what the alternative is (I asked about better alternatives here).

I based this PR off of a similar PR for react-native-maps.

It's unfortunate that this fix requires adding the first and only dependency to this package, but without adding deprecated-react-native-prop-types to dependencies, anyone who wants to use this package would need to have their own copy of deprecated-react-native-prop-types installed, which would be annoying.

ajenkins avatar May 15 '22 17:05 ajenkins

Update: Got a reply from someone on the React team about the "right" way to fix this. Apparently they want everyone to start using Flow or Typescript instead of relying on prop types.

Migrating to Flow or Typescript would be a much bigger change though, and probably isn't worth doing just to fix this one warning.

ajenkins avatar May 15 '22 18:05 ajenkins

@githuboftigran can we get this PR merged?

tomskopek avatar Jun 15 '22 17:06 tomskopek

Seeing as this is now an error and no longer a warning: Can we please get this merged and fixed soon?

ptreitler avatar Jul 04 '22 12:07 ptreitler

Please, merge this request @githuboftigran. The warning now became an error, and cannot use this wonderful module in newer versions.

julioxus avatar Aug 21 '22 13:08 julioxus

@julioxus @ptreitler @tomskopek
you could make use of this https://www.npmjs.com/package/range-slider-react-native

boma25 avatar Aug 29 '22 19:08 boma25

Can this be merged? it caused an error instead of a warning

gregoriusjimmy avatar Sep 02 '22 03:09 gregoriusjimmy

Can this be merged? it caused an error instead of a warning

Use this instead

https://www.npmjs.com/package/range-slider-react-native

boma25 avatar Sep 02 '22 05:09 boma25

Can this be merged? it caused an error instead of a warning

Use this instead

https://www.npmjs.com/package/range-slider-react-native

thanks @boma25 !

gregoriusjimmy avatar Sep 03 '22 14:09 gregoriusjimmy

This is fixed in 2.2.1

githuboftigran avatar Sep 15 '22 08:09 githuboftigran