Ленивый неизвестность не работает в React Native - PullRequest
0 голосов
/ 20 декабря 2018

Учитывая этот компонент

import React, {lazy, Suspense} from "react"
import {View, StyleSheet, Text, ScrollView} from "react-native"

const Sections = lazy(() => import('./story/Sections'))

export default StoryScreen = (props) => (

  <Suspense fallback={<Text>Loading...</Text>}>
    <View style={styles.container}>
      <ScrollView style={styles.sectionContainer}>
        <Sections sections={props.item.sections}/>
      </ScrollView>
    </View>
  </Suspense>
)

с Sections.js как

import React from "react"
import Section from "./Section"

export default Sections = (props) => (
  props.sections.map((section) => (
    <Section key={section.id_section} {...section}/>
  ))
)

Ошибка, которую я получаю при переходе к компоненту: enter image description here

Я не знаю, где я делаю неправильно.Любая подсказка?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...