Skip to content

Instantly share code, notes, and snippets.

View TolaAbiodun's full-sized avatar
🏠
Working from home

Tola Abiodun TolaAbiodun

🏠
Working from home
  • Lagos, Nigeria.
View GitHub Profile
import React from "react";
import { Dimensions, TextInput, ScrollView } from "react-native";
import Animated, {
useAnimatedKeyboard,
useAnimatedReaction,
runOnJS,
KeyboardState,
useAnimatedProps,
useAnimatedScrollHandler,
@TolaAbiodun
TolaAbiodun / FlatListGapExample.jsx
Created September 30, 2024 14:43 — forked from intergalacticspacehighway/FlatListGapExample.jsx
Add gap in FlatList items with numColumns
import {Dimensions, FlatList, View} from 'react-native';
const screenWidth = Dimensions.get('window').width;
const numColumns = 2;
const gap = 5;
const availableSpace = screenWidth - (numColumns - 1) * gap;
const itemSize = availableSpace / numColumns;
const renderItem = ({item}) => {
@TolaAbiodun
TolaAbiodun / NIbssistitutionlist
Created January 19, 2024 00:10 — forked from OlabodeAbesin/NIbssistitutionlist
Nigerian bank, bank/institution codes and logo
[
{
"id": 376,
"InstitutionCode": "090270",
"InstitutionName": "AB MICROFINANCE BANK",
"Category": "9",
"dump": null,
"created_at": "2020-03-02 20:44:54",
"updated_at": "2020-08-24 00:02:52",
"deleted_at": null,
@TolaAbiodun
TolaAbiodun / useStorage.js
Created April 3, 2023 20:05 — forked from ali-sabry/useStorage.js
This custom hook can used to manage the local and session storage and save your data such as simple string or object this hook provides a simple way to persist data across page refreshes or even between different sessions. It's a useful tool for building web applications that need to remember user preferences or other stateful information.
import { useEffect, useState } from 'react';
const useStorage = (key, initialValue, storageType) => {
let targetStorage;
/* check if the `window` object is available before using it, or to provide a fallback storage mechanism for server-
side rendering. */
if (typeof window !== 'undefined') {