-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
SolitoImageProvider loader not working #280
Comments
It’s possible it’s because your image starts with https…this might have been an incorrect implementation on my end, I figured that’d only be used for unoptimized URLs. Not positive that’s it, but it might be. |
Hm, that’s weird. Do you have multiple versions of Solito installed? |
I just ran |
It looks like in https://github.com/nandorojo/solito/blob/master/src/image/use-solito-image.ts#L77 it is using the loader passed to it, and in there https://github.com/nandorojo/solito/blob/master/src/image/fast/fast.tsx#L11 the loader passed to it is the one from the props. Nowhere it is checking for the one in the context. |
Can you try Solito 2.1.1? I think I just released a fix. |
Yes! It is working now. Thank you :) |
Actual
Custom
SolitoImageProvider
loader is not being used bySolitoImage
components down the App.Expected
The custom loader is used.
Versions
How to reproduce
Follow the steps at https://solito.dev/tailwind and install the dependencies for
solito/image
as mentioned in https://solito.dev/usage/image#expoIn
apps/expo/App.tsx
:in
packages/app/features/home/screen.tsx
:When running
npx expo run:ios
(or android) I see the image provided to the SolitoImage and not the one that is returned by the loader nor the log from theconsole.log
.If I put the loader directly on the
SolitoImage
component, I get as expected the image returned by the loader. So it seems that the context is not used properly by theSolitoImage
or there is something I am missing.The text was updated successfully, but these errors were encountered: