Skip to content

Instantly share code, notes, and snippets.

View cristiangu's full-sized avatar

Cristian Gutu cristiangu

View GitHub Profile
@cristiangu
cristiangu / after.tsx
Last active September 28, 2023 11:00
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} />));
}
@cristiangu
cristiangu / Example.tsx
Last active September 2, 2023 14:38
react-native-fast-image patch diff to fix the image change flickering
import FastImage from 'react-native-fast-image';
return (
<FastImage
useLastImageAsDefaultSource
source={source}
/>
);
@cristiangu
cristiangu / Step-1.tsx
Last active August 5, 2023 15:47
React Native Animated Bottom Modal in a Native Stack Navigator
<RootStack.Navigator>
<RootStack.Screen name="other-screen" component={OtherScreen} />
<RootStack.Group
screenOptions={{
presentation: 'containedTransparentModal',
animation: 'slide_from_bottom',
}}>
<RootStack.Screen name="g-modal" component={GModal} />
</RootStack.Group>
</RootStack.Navigator>
{
// put this inside /.vscode dir
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to packager",
"request": "attach",
@cristiangu
cristiangu / dabblet.css
Created December 20, 2014 13:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@cristiangu
cristiangu / dabblet.css
Created December 20, 2014 13:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@cristiangu
cristiangu / dabblet.css
Created December 20, 2014 13:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;