-
Notifications
You must be signed in to change notification settings - Fork 157
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
Failed prop type? #108
Comments
Can I see how you are invoking the Masonry component, along with your dataset? |
Thanks for the quick response brh55, Since I'm still working on the frontend, I simply created some fake data following the structure shown in README. The code is as follows: class Gallery extends Component{
} |
@RyanKeepRunning
|
Thanks for the suggestion brh55. I did make a stupid mistake here. However, after modifying my code accordingly, I found I'm still triggering the same warning (using expo). Then I deleted almost everything to make the code exactly the same as the instruction in README, the warning still exists. Are there any problems with defaultComponent and Injector? The code is shown below. I can't find any difference between the current code and the given example. ` class Gallery extends Component{
} const styles = StyleSheet.create({ export default Gallery; |
@RyanKeepRunning Yeah I figured that wouldn't fix the warning, but at least we have the masonry rendering for you. For the warning, it seems the injector is getting complaints with the prop type, so I'll update the dependency and bump minor version. |
Thank you so much for your help. Looking forward to the updated version. |
Hey @RyanKeepRunning , Try pulling in the latest and see if this keeps the warnings at bay. |
Now I'm running my application on Android, and I got this error when I tried to run this very basic example. `import React,{Component} from 'react'; class Gallery extends Component{
} export default Gallery;` |
I also saw the same issue in another thread, does android app need extra configuration in order to use react-native-masonry? |
Sorry been trying to set up my Android environment but running through several issues that keep burning through my patience. Honestly, I don't get to allocate too much time on this project as I would like due to other personal constraints and other projects, but hoping we can get some other contributors to help out. |
Hi,
I got this warning while implementing a simple masonry using react-native-masonry. Did anyone encounter this warning as well? How could I fix it?
Warning: Failed prop type: Invalid prop
defaultComponent
of typeobject
supplied toInjector
, expectedfunction
.in Injector (at Brick.js:40)
in Brick (at Column.js:112)
in RCTView (at View.js:44)
in CellRenderer (at VirtualizedList.js:687)
in RCTScrollContentView (at ScrollView.js:852)
in RCTScrollView (at ScrollView.js:977)
in ScrollView (at VirtualizedList.js:1062)
in VirtualizedList (at FlatList.js:662)
in FlatList (at Column.js:130)
in RCTView (at View.js:44)
in Column (at Masonry.js:209)
in StaticRenderer (at ListView.js:456)
in RCTScrollContentView (at ScrollView.js:852)
in RCTScrollView (at ScrollView.js:977)
in ScrollView (at ListView.js:324)
in ListView (at Masonry.js:200)
in RCTView (at View.js:44)
in Masonry (at Gallery.js:68)
in RCTView (at View.js:44)
in Gallery (created by SceneView)
in SceneView (at StackViewLayout.js:795)
in RCTView (at View.js:44)
in AnimatedComponent (at StackViewCard.js:69)
in RCTView (at View.js:44)
in AnimatedComponent (at screens.native.js:59)
in Screen (at StackViewCard.js:57)
in Card (at createPointerEventsContainer.js:27)
in Container (at StackViewLayout.js:860)
in RCTView (at View.js:44)
in ScreenContainer (at StackViewLayout.js:311)
in RCTView (at View.js:44)
in AnimatedComponent (at StackViewLayout.js:307)
in Handler (at StackViewLayout.js:300)
in StackViewLayout (at withOrientation.js:30)
in withOrientation (at StackView.js:79)
in RCTView (at View.js:44)
in Transitioner (at StackView.js:22)
in StackView (created by Navigator)
in Navigator (at createKeyboardAwareNavigator.js:12)
in KeyboardAwareNavigator (created by SceneView)
in SceneView (at createTabNavigator.js:39)
in RCTView (at View.js:44)
in RCTView (at View.js:44)
in ResourceSavingScene (at createBottomTabNavigator.js:113)
in RCTView (at View.js:44)
in ScreenContainer (at createBottomTabNavigator.js:103)
in RCTView (at View.js:44)
in TabNavigationView (at createTabNavigator.js:197)
in NavigationView (created by Navigator)
in Navigator (at createAppContainer.js:388)
in NavigationContainer (at withExpoRoot.js:22)
in RootErrorBoundary (at withExpoRoot.js:21)
in ExpoRootComponent (at renderApplication.js:34)
in RCTView (at View.js:44)
in RCTView (at View.js:44)
in AppContainer (at renderApplication.js:33)
The text was updated successfully, but these errors were encountered: