-
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
Re-add support for local images #16
Comments
Does this mean the example is void? I had a look through your code and it appears that you are indeed using uri in the source prop of the Image component:
Just trying to get it running myself with remote images! |
@dazziola Thanks for catching that. |
Hmmm, I'm having a weird non-descript problem. I'm using the data block of images as per your example with two columns, however they're not rendering in the simulator or on a physical device. |
@dazziola What version of RN and React are you running? |
"react-native": "0.43.3", |
@dazziola Also does your debug log show up any information? react-native-masonry will inform you if an image has failed to load as a warning, so you should see that if it's an issue with loading the network image. |
I've cloned the example and you're right, it works perfectly. Hmmm, I'll mess around with my one and see if I can figure out what it is. Thanks for the prompt responses! If it's anything other than my own silly oversight, I'll be sure to post it here for future people! |
@dazziola |
Still currently trying to resolve this issue without the need to require a local image prop or something like that. Ideally I want the users to be able to set |
@brh55 Well why are you assuming |
@fxfactorial Would work, but then local images wouldn't be able to leverage other properties such as |
@brh55 How so? |
@fxfactorial I'm assuming you are referring to users passing in react elements like |
Hmm, I wasn't but that seems like a fine solution as well. |
Ahh what other way are you referring to? |
I mean, just a front for the source prop of Image. |
OHH yeah that should work, I'm not sure why I was having issues before. |
@brh55 actually now I'm thinking, should let end user provide their own Image component, or whatever view they give. Why assume masonry desired is image? For example, what if I wanted to use this: https://github.com/oblador/react-native-image-progress |
@fxfactorial Interesting yeah you could overload the Image component with any desired image component. Well without images, it's rather straightforward to achieve the sme effect: So RNM was initially to solve this issue using remote images, since it needs to fetch the image and pass on the proper size to the image component. But RNM has grown to fit others needs along the way haha. |
How do you mean to overload? |
Ah let me rephrase that -- I think it would be neat if you could use a custom image component, and it's probably possible. By having a property that could allow users to pass a component for RNM to use in the rendering process instead of the default image component -- assuming the third-party component had I'm sure there is another way of doing this that I perhaps am skipping over. |
right, definitely some room for generalization |
Indeed, theoretically it should work. |
Per suggestions, there is still some underlying bundling that is occurring not allowing it to work as imagined technically. Going to leave this open, and welcomed for anyone to try and come up with a viable solution. |
Looks like I may have missed it during development of v0.1.0.
Reproduction Instructions:
Validate:
The text was updated successfully, but these errors were encountered: