Skip to content

[BUG] TypeError: Reduce of empty array with no initial value #18

@hjonac

Description

@hjonac

Software Package Version:

Describe the bug
Error when trying to load local images.

import React, { Component } from 'react'
import { View, Image } from 'react-native'
import ImageLayout from 'react-native-image-layout'
import { Container, Content, Card, CardItem } from 'native-base'
import { view } from '../styles/'
import EStyleSheet from 'react-native-extended-stylesheet'
import { UserContext } from '../context/UserContext'
import Header from '../components/Header'

import images from '../assets'

const s = EStyleSheet.create({
	...view,
	image: {
		height: 400, 
		left: 0, 
		right: 0,
		flex: 1
	}
});

class Recomendaciones extends Component {

	static navigationOptions = {
		// headerTitle instead of title
		headerTitle: <Header title={'Recomendaciones'} withBack />,
	};

	constructor(props) {
		super(props)
	}

	render() {
		return (
			<ImageLayout
				images={[
					{source: require("../assets/reco1.png"), width: 1600, height: 1600},
					{source: require("../assets/reco2.png"), width: 1600, height: 1600}
				]}
			/>
		);
	}
}

export default Recomendaciones;

Screenshots
Captura de Pantalla 2020-01-14 a la(s) 3 43 43 p  m

Version (please complete the following information):

  • Device: iPhone 11
  • Android:
  • iOS: 13.3
  • react-native: 0.61.4
  • react: 16.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions