-
Notifications
You must be signed in to change notification settings - Fork 585
React Native Skia on Web - Unable to load with multiple tabs open at once #3505
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Using WithSkiaWeb, having more then one tab opened at once, fallback attribute will trigger
I've also checked that canvaskit.wasm is correctly fetching in duplicated tab, so I guess it's just issue with WithSkiaWeb
React Native Skia Version
2.2.12
React Native Version
0.81.4
Using New Architecture
- Enabled
Steps to Reproduce
- Use WithSkiaWeb
import '@expo/metro-runtime'
import { WithSkiaWeb } from '@shopify/react-native-skia/lib/module/web';
import { fontsConfig } from './fontsConfig';
import { useFonts } from 'expo-font';
import UILoaderText from './components/UI/UILoaderText';
export default function App() {
let location = window.location.origin
/* -------------------------- 2. Load Project Font -------------------------- */
const [fontsLoaded] = useFonts(fontsConfig);
if (!fontsLoaded) return <UILoaderText text='Fonts' />;
/* -------------------------------------------------------------------------- */
return (
<WithSkiaWeb
getComponent={() => import("./AppCore")}
opts={{
locateFile: (file) => `${location}/${file}?v=${Date.now()}`
}}
fallback={<UILoaderText text='Loading skia web...' />}
/>
);
}- Duplicate Tab in browser
- Unable to pass Loading skia web
Snack, Code Example, Screenshot, or Link to Repository
import '@expo/metro-runtime'
import { WithSkiaWeb } from '@shopify/react-native-skia/lib/module/web';
import { fontsConfig } from './fontsConfig';
import { useFonts } from 'expo-font';
import UILoaderText from './components/UI/UILoaderText';
export default function App() {
let location = window.location.origin
/* -------------------------- 2. Load Project Font -------------------------- */
const [fontsLoaded] = useFonts(fontsConfig);
if (!fontsLoaded) return <UILoaderText text='Fonts' />;
/* -------------------------------------------------------------------------- */
return (
<WithSkiaWeb
getComponent={() => import("./AppCore")}
opts={{
locateFile: (file) => `${location}/${file}?v=${Date.now()}`
}}
fallback={<UILoaderText text='Loading skia web...' />}
/>
);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.