Skip to content

It's a Proxy component to react-native to improve apps performance around react component.

License

Notifications You must be signed in to change notification settings

faustoct1/react-native-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

react-native-proxy

React Native performance improver made easy :)

What's it?

It's a Proxy component to react-native to improve apps performance.

When to use?

Use it to improve app or components performance.

How works?

It creates a proxy around the view component. The component starts loading lazily, instead eager, when app starts or component loads. Combine with libs and components like react-navigation, react-native components, etc.

How to use?

App.js

/* Loading views and proxy */

import React from 'react'
import Views from './Views.js'

export default App = () => (
  <Views />
)

Navigating between views using proxy (lazy loading views)

//import
import { useNavigation } from '@react-navigation/native'

//get navigation
const navigation = useNavigation()

<TouchableOpacity style={{margin:10,padding:10}} onPress={()=>{ navigation.navigate('Proxy',{component:'Component1',title:'Screen name comes here'}) }}>
  <Text>Navite to component 1</Text>
</TouchableOpacity>

Limitations

navigation.navigate x navigation.push to work properly you must use push instead of navigate. The method navigate reuses the view which leads in navigate to Proxy again. But you can still using navigate outside the proxy.

About

It's a Proxy component to react-native to improve apps performance around react component.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published