npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-flexbox-grid-fixed

v0.3.1

Published

Grid system for react native based on flexbox grid's api

Downloads

8

Readme

Flexbox Grid

A Set of React Native Components to make a grid easier to reason about.

The Problem

Responsive Design is easy on the web but a bit harder on a mobile app.

I'm experimenting with using a CSS type grid to have conditional looks based on device width similar to media queries.

Getting Started

Installation

In your react native project

npm install react-native-flexbox-grid

Import

import {Column as Col, Row} from 'react-native-flexbox-grid';

Basic Example

<View style={styles.container}>        
  <Row size={12}>
    <Col sm={6} md={4} lg={3}>
      <Text>
        First Column
      </Text>
    </Col>
    <Col sm={6} md={4} lg={3}>
      <Text>
        Second Column
      </Text>
    </Col>
  </Row>      
</View>

The api is inspired by react-flexbox-grid, but it is not exactly the same.

The main difference is you can specify the grid size. By default <Row> is a size of 12. However if you want you can make a <Row> any size you want.

More Documentation

Documentation

Changes for 0.3.0

React Native now supports percentages as of 0.42. All of our versions going forward will rely on percentages. It has much faster performance compared to what we did before when we relied on onLayout. The API for apps is the same. There should be no difference in expected output of your app.

Changes for 0.2.0

As of 0.2.0 Row will automatically wrap components. If you do not want components to automatically wrap you must specify nowrap in the row's prop.

  <Row size={12} nowrap>

Known Issues

For react-native 0.41 and earlier you muse use [email protected] or earlier.

Since React Native before 0.41 and earlier doesn't support percentages we have to rely on using React Native's onlayout to pass the width of the parent to the child. This causes layouts to be a bit slow, because the child has to wait for the parent to layout and then rerender. This problem is resolved by using react native 0.42 and the [email protected] or later.

What's working

  • Basic Grid
  • Styles
  • Hiding Items
  • Basic Unit Testing

To Do

  • Integration Testing. (Possibly New Examples Repo)