githuboftigran / rn-range-slider

A native slider with range
MIT License
234 stars 130 forks source link

Fix ViewPropTypes warning #122

Closed ajenkins closed 1 year ago

ajenkins commented 2 years ago

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 commented 2 years ago

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.

tomskopek commented 2 years ago

@githuboftigran can we get this PR merged?

ptreitler commented 2 years ago

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

julioxus commented 1 year ago

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

boma25 commented 1 year ago

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

gregoriusjimmy commented 1 year ago

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

boma25 commented 1 year ago

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

Use this instead

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

gregoriusjimmy commented 1 year ago

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 !

githuboftigran commented 1 year ago

This is fixed in 2.2.1