• Stars
    star
    212
  • Rank 186,122 (Top 4 %)
  • Language
    TypeScript
  • License
    Other
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”ฒ Easy getItemLayout props for react-native SectionLists.

React Native SectionList getItemLayout

This package provides a function that helps you construct the getItemLayout function for your SectionLists. For an explanation of why this exists, see this post. It's meant to be used like this:

import sectionListGetItemLayout from 'react-native-section-list-get-item-layout'

class MyComponent extends React.Component {
  constructor(props) {
    super(props)

    this.getItemLayout = sectionListGetItemLayout({
      // The height of the row with rowData at the given sectionIndex and rowIndex
      getItemHeight: (rowData, sectionIndex, rowIndex) => sectionIndex === 0 ? 100 : 50,

      // These four properties are optional
      getSeparatorHeight: () => 1 / PixelRatio.get(), // The height of your separators
      getSectionHeaderHeight: () => 20, // The height of your section headers
      getSectionFooterHeight: () => 10, // The height of your section footers
      listHeaderHeight: 40, // The height of your list header
    })
  }

  render() {
    return (
      <SectionList
        {...otherStuff}
        getItemLayout={this.getItemLayout}
      />
    )
  }
}

More Repositories

1

hapttic

โฉ Hapttic is a simple HTTP server that forwards all requests to a shell script.
Go
187
star
2

semaphore-async-await

๐ŸŽŒ Promise based Semaphore suitable to be used with async/await.
TypeScript
99
star
3

MongoStyleGuide

๐Ÿ“— An opinionated guide to data modeling with MongoDB.
87
star
4

react-native-async-storage-dev-menu-item

๐ŸŽ›๏ธ Adds an option to your dev menu to console.log the contents of your AsyncStorage.
Java
87
star
5

react-native-settings-screen

โš™๏ธ A component that inflates an object describing your app's settings turning it into a beautiful component.
TypeScript
61
star
6

react-native-bouncy-view

A bouncy View.
JavaScript
12
star
7

mouette

๐Ÿฆ [WIP] Lint your MongoDB.
TypeScript
12
star
8

nibbana

๐Ÿ”Š [WIP] Analytics for react native. Keep complete control of your data and find out how your users use your app.
TypeScript
8
star
9

Lagou

โœ‹ A readable, commented Promise implementation for educational purposes.
JavaScript
7
star
10

ljsp

My BSc project, a compiler for Lisp that emits asm.js, C and LLVM IR written in Scala.
JavaScript
5
star
11

react-native-press-me-button

๐Ÿ‘‡ A button that screams "Press me!"
Java
4
star
12

defaultdict-proxy

A Proxy based JavaScript port of python's defaultdict.
JavaScript
3
star
13

guan

๐ŸŽบ Deployment pipelines for personal projects.
Rust
2
star
14

AdventOfCode

Rust
2
star
15

HotaruServer

A mobile app back-end framework.
JavaScript
2
star
16

ClozedForBusiness

๐Ÿ—ƒ๏ธ Create cloze deletion Anki cards while reading Chinese texts.
JavaScript
2
star
17

jsoendermann.github.io

My personal website.
HTML
2
star
18

algos-and-datastructures

TypeScript
2
star
19

backup-mongo-to-s3

Docker image that dumps, zips, encrypts and uploads your mongo db to s3 on a cron schedule.
Shell
2
star
20

hgql

๐Ÿ“ฅ A tiny, magic-free, hook-based graphql client library for React
TypeScript
2
star
21

argus

1
star
22

mongodb-auto-reconnect

Automatically reconnect to your MongoDb.
TypeScript
1
star
23

count-down-the-days

JavaScript
1
star
24

capsule

1
star
25

CraftingInterpreters

TypeScript
1
star
26

practice-grid

JavaScript
1
star
27

react-native-fresh-id

TypeScript
1
star
28

rustlings-solutions

Rust
1
star
29

fresh-id-node

TypeScript
1
star
30

gehirn

1
star
31

react-native-animated-text

Objective-C
1
star
32

EmojiCalendar

๐Ÿ“… Emojis for your menu bar.
Swift
1
star
33

niu

๐Ÿšง [wip] A socks proxy that sits in front of a parent proxy and learns which sites are inaccessible.
Rust
1
star
34

aftm

Code for the Automated Fortune Teller Machine.
Python
1
star
35

segmenting-trie

A trie implementation that segments strings into words.
TypeScript
1
star
36

music-theory-anki-decks

JavaScript
1
star
37

moeve

Rust
1
star
38

color-clock

HTML
1
star
39

random-merge

TypeScript
1
star
40

react-native-attention-grabber

โ€ผ๏ธ Grab your users' attention by wrapping your components in an AttentionGrabber.
TypeScript
1
star
41

react-native-async-storage-utils

JavaScript
1
star
42

ComponentGallery

๐ŸŽ† A gallery of the react native components I've written.
JavaScript
1
star
43

HotaruClient

The Hotaru JavaScript SDK.
TypeScript
1
star
44

ready-for-takeoff

Ruby
1
star