-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Android not showing images first time around #603
Comments
I still haven't been able to resolve this, here is an example of what I mean: const [token, saveToken] = useState<string | null>(null);
const provideEmbeddedHeaders = (uri: string, tagName: string) => {
if (tagName === 'img') {
return {
Authorization: `Bearer ${token}`,
};
}
}; The token state is fetched upon component render (useEffect) but provideEmbeddedHeaders has been rendered before this and does not rerender on state change. Seems like a pretty common use case to me, but the docs only show an example with a hardcoded authorization header: https://meliorence.github.io/react-native-render-html/api/renderhtmlconfig#provideembeddedheaders Which I think is not the case most of the time, help would be appreciated. |
any update here ? |
Decision Table
<yyy>
is not rendered”Good Faith Declaration
Description
I am working on a app where the images are behind authentication, using provideEmbeddedHeaders I am able to insert a bearer token and partly have this working on iOS however on Android no images are showing up first time around, when I come back to the screen with the images then they are there. I have been stuck on this for the past 2 days.
Is this a known issue? I've searched for the answer but couldn't find it.
My application is also facing the same bug as pointed out in this issue: #580 it keeps rerendering when the images fail to load.
React Native Information
RNRH Version
6.3.3
Tested Platforms
Reproduction Platforms
Minimal, Reproducible Example
Additional Notes
No response
The text was updated successfully, but these errors were encountered: