Comments (12)
1- Import ViewStyle from react-native. import { ViewStyle } from 'react-native';
2- Replace View.propTypes.style
with ViewStyle in the (Carousel, Pagination, ParallaxImage, PaginationDot) files.
3- Ensure to patch the package after making the changes.
from react-native-snap-carousel.
1- Import ViewStyle from react-native.
import { ViewStyle } from 'react-native';
2- Replace
View.propTypes.style
with ViewStyle in the (Carousel, Pagination, ParallaxImage, PaginationDot) files. 3- Ensure to patch the package after making the changes.
This solved my problem , thank you man!
from react-native-snap-carousel.
Although this is not a fundamental solution, I will write a method to resolve and execute the error.
Since the error is thrown by the type
In “node_module/react-native-snap-carousel
Delete all lines in “node_module/react-native-snap-carousel” that use “View.propTypes.style”.
In the above example
Remove all lines using “containerCustomStyle: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style,”
Delete all but one line of “View.propTypes.style”.
Then you will get the next error, so repeat erasing the one line there. (View.propTypes.style this is the line that contains it)
You have to wait for the version to be updated.
Translated with DeepL.com (free version)
根本的な解決にはなりませんが、エラーを解消し実行する方法を書きます。
型でエラーを吐いているので
「node_module/react-native-snap-carousel」内の
「View.propTypes.style」を使用している行をすべて削除します。
上記の例では
「containerCustomStyle: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style,」
の1行を全て消す。
そうすると次のエラーが出るので、そこの1行を消すことを繰り返します。(View.propTypes.styleこれが含まれている行です)
バージョンアップされるのを待つしかないです。
from react-native-snap-carousel.
ViewStyle
how exactly does one patch a package?
look at the doc patch-package
from react-native-snap-carousel.
react-native-snap-carousel+3.9.1.patch
Patch fix for the above issue
from react-native-snap-carousel.
Although this is not a fundamental solution, I will write a method to resolve and execute the error. Since the error is thrown by the type
In “node_module/react-native-snap-carousel Delete all lines in “node_module/react-native-snap-carousel” that use “View.propTypes.style”. In the above example Remove all lines using “containerCustomStyle: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style,” Delete all but one line of “View.propTypes.style”. Then you will get the next error, so repeat erasing the one line there. (View.propTypes.style this is the line that contains it)
You have to wait for the version to be updated.
Translated with DeepL.com (free version)
根本的な解決にはなりませんが、エラーを解消し実行する方法を書きます。 型でエラーを吐いているので
「node_module/react-native-snap-carousel」内の 「View.propTypes.style」を使用している行をすべて削除します。 上記の例では 「containerCustomStyle: ViewPropTypes ? ViewPropTypes.style : View.propTypes.style,」 の1行を全て消す。 そうすると次のエラーが出るので、そこの1行を消すことを繰り返します。(View.propTypes.styleこれが含まれている行です)
バージョンアップされるのを待つしかないです。
Unfortunately, this method did not work, it causes another error.
from react-native-snap-carousel.
ViewStyle
how exactly does one patch a package?
from react-native-snap-carousel.
I am facing the same issue
from react-native-snap-carousel.
I am facing the same issue
already fix this problem ? if you fix please help me
from react-native-snap-carousel.
ViewStyle
how exactly does one patch a package?
look at the doc patch-package
thanks, my issue is resolved
from react-native-snap-carousel.
@aguidad solution works, thank you
from react-native-snap-carousel.
from react-native-snap-carousel.
Related Issues (20)
- Dynamic Height Content in Carousel
- when i set startAutoplay to true, it cannot auto play, i do not know wht
- white space is coming if I disabled the infinite scroll HOT 1
- how to detect slide animation end??
- snap carousel
- ViewPropTypes will be removed from React native HOT 1
- Fix ViewPropTypes usage for deprecated prop types HOT 2
- h
- This causes issues when switching to RTL in Android
- App crashes on android 12 devices due to useNativeDriver true on slide animations
- React Native Snap Carousel ViewPropTypes warning resolved
- ViewPropTypes will be removed from React Native error
- why this carousel not give me onScroll native events. like flatlist i want to move 2 carousel at the same time on the base of reference. i can handle it by onSnapToIndex and onScrollEnd but i want to handle onScrollBeing .
- [Android] Carousel is glitchy when snapping
- How can we stop auto play on button Press?
- ViewPropTypes are removed from react-native
- <Pagination> Error : Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
- Fix: PropType Errors on typescript HOT 2
- for work in [email protected]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-snap-carousel.