Skip to content
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

React Native Svg Linear Gradient Not loading when redirecting to bottom navigation tab #2225

Open
oliviercperrier opened this issue Feb 19, 2024 · 1 comment

Comments

@oliviercperrier
Copy link

oliviercperrier commented Feb 19, 2024

Bug

I have a SVG with a Linear Gradient Bg, when i use a flat color bg everything is fine.

I have this router (using expo-router):

  • Tab Nav
    • Page One
    • Page Two

Some Details:

  • The SVG is on Page One.
  • The root of my app is redirecting the user to page Two in the Tab Nav (First page that should be shown).

If i open my app from the root (localhost:8081/), i get to Page Two and when i get to page one (by click in the tab nav), the SVG doesn't load, but the SVG element is in the DOM.

if i open my app from page two (localhost:8081/two) and then go to page one, the SVG load correctly.

I Added a video here: Screen Recording 2024-02-19 at 2.01.11 PM.zip

In the video i first:

  • Load the app from root and show the svg not loading,
  • Then i load the app from page two and show that the svg is loading correctly

Steps To Reproduce

1. git clone https://github.com/oliviercperrier/react-native-svg-linear-gradient-repro
2. npm install
3. npm run web
4. Load the app from the root `localhost:8081/`
5. Go to page one
6. SVG should be loading (but its not)
@oliviercperrier
Copy link
Author

Up this is a big issue for my team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant