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

remove usage of ViewPropTypes #1424

Merged
merged 1 commit into from
Apr 20, 2021
Merged

Conversation

bananer
Copy link

@bananer bananer commented Feb 25, 2021

ViewPropTypes are deprecated in react-native ( react-native-community/discussions-and-proposals#29 , react-native-community/discussions-and-proposals#29 ) and were already removed from react-native-web.

Supposedly #1236 should fix building with react-native-web 12+, however that did not work for me and many others (see #1033). I'm still getting the error "Attempted import error: 'ViewPropTypes' is not exported from 'react-native' (imported as 'ReactNative')."

It seems to me that the usage of ViewPropTypes does not add a lot of value anyways, the generic types like PropTypes.object from the prop-types package are used for most type definitions in Calendar and Agenda.

Therefore, i propose removing the reliance on ViewPropTypes for the only two cases where it was used. This should make the package compatible with react-native-web today and a future version of react-native with ViewPropTypes removed.

src/agenda/index.js Outdated Show resolved Hide resolved
@bananer bananer force-pushed the remove_viewproptypes branch from 98ff71a to bfb7bbd Compare April 20, 2021 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants