ios – react-native-particles-bg lag on mobile


This lib support react-native and react-native-web version as per doc.

This lib perfectly work on web but when this run on mobile it will lagging.

I was completed all installation steps and depended library.

npm install react-native-particles-bg @flyskywhy/react-native-gcanvas

------------------------------------------------------------

For @flyskywhy/react-native-gcanvas it need additional steps for ios

Add below into /ios/Podfile
  pod "GCanvas", :path => "../node_modules/@flyskywhy/react-native-gcanvas/GCanvas.podspec"

cd YOUR_PROJECT/ios
pod install

My App.js file

import React from 'react';
import { SafeAreaView, StyleSheet } from 'react-native';

import ParticlesBg from 'react-native-particles-bg';
class App extends React.Component {
  render() {
    return <SafeAreaView style={{ flex: 1, backgroundColor:"#DDDDDD" }}>
      <ParticlesBg type="circle" bg={true} />
    </SafeAreaView>
  }
}

Output in mobile and web
In output gif Left side was mobile and right side web

Why it is lagging?
How to resolve that issue?

I think may be issue in react-native-gcanvas

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img