Skip to content

Instantly share code, notes, and snippets.

@cristiangu
Last active September 28, 2023 11:00
Show Gist options
  • Save cristiangu/c5e0567e9f4734519c6249bce3112670 to your computer and use it in GitHub Desktop.
Save cristiangu/c5e0567e9f4734519c6249bce3112670 to your computer and use it in GitHub Desktop.
Optimising React Native's View render speed
import React from 'react';
import { View } from './view';
const MyScreen = () => {
return Array.from(Array(5000).keys()).map((i) => (<View key={i} />));
}
import React from 'react';
import { View } from 'react-native';
const MyScreen = () => {
return Array.from(Array(5000).keys()).map((i) => (<View key={i} />));
}
export const View = require('react-native/Libraries/Components/View/ViewNativeComponent').default;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment