Skip to content

Instantly share code, notes, and snippets.

@danbit
danbit / Home.js
Created March 15, 2018 14:29
React Native - ListView with infinite scroll and a Banner on Header
import React, { Component, PropTypes } from 'react';
import { View, ListView, RefreshControl } from 'react-native';
import { connect } from 'react-redux';
import { NoticiaItem } from './../../components/NoticiaItem';
import { NoticiaBanner } from './../../components/NoticiaBanner';
import * as actions from './../../actions';
import styles from './styles';
import { colors } from './../../config/styles';
import { DESTAQUES } from '../../data/categories';
import banners from '../../data/banners';
@danbit
danbit / NoticiaList.js
Created March 8, 2018 01:52
React Native - ListView with infinite scroll
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { View, ListView, RefreshControl } from 'react-native';
import { NoticiaItem } from '../NoticiaItem';
import * as actions from '../../actions';
class NoticiaList extends Component {
componentDidMount() {
console.log('componentDidMount');
this.noticiaFetch(1);