akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.27k stars 951 forks source link

App crashes with Layout component #1360

Closed Vasault closed 3 years ago

Vasault commented 3 years ago

🐛 Bug Report

I'm having issues with Layout component inside a specific screen, with two different use cases, a loading spinner thing, and tab view

The application provider has already been included in the App.tsx

Not sure what exactly is causing this issue, but just to mention something, a few weeks ago this was working without any issues, this specific screen hasn't been edited at all. Tho we created a tab navigation to include a different screen, but still not sure if this is why it stopped working.

This is the error i'm getting

Captura de Pantalla 2021-02-25 a la(s) 15 40 35

This part of the code that includes the Layout

        {
          !isLoading 
            ?
              <View style={[styles.box2]}>
                <TabView
                  style={styles.tabView}
                  selectedIndex={selectedIndex}
                  onSelect={index => setSelectedIndex(index)}>
                  <Tab title='Sucursales'>
                    <Layout style={styles.tabContainer}>
                      <AdapterListSucursales listSucursales={DataManager.DetalleEmpresa.ListSucursales} propiedades={props} />
                    </Layout>
                  </Tab>
                  <Tab title='Servicios'>
                    <Layout style={styles.tabContainer}>
                      <AdapterListServicios listServicios={DataManager.DetalleEmpresa.ListServicios} />
                    </Layout>
                  </Tab>
                </TabView>
              </View>
            : 
              <Layout style={styles.layoutSpinner}>
                <Spinner style={ styles.spinner } size='large'/>
              </Layout>
        }

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Include Layout without crashing the application

UI Kitten and Eva version

Package Version
@eva-design/eva ^2.0.0
@ui-kitten/components ^5.0.0
@ui-kitten/eva-icons ^5.0.0

Environment information

System: OS: macOS 10.15.7 CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz Binaries: Node: 13.11.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 7.5.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: API Levels: 27, 28, 29 Build Tools: 28.0.3, 29.0.2, 29.0.3 System Images: android-27 | Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 12.0/12A7209 - /usr/bin/xcodebuild npmPackages: react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 npmGlobalPackages: react-native-cli: 2.0.1

Vasault commented 3 years ago

Solved, visual code automatically imported a different Layout and ApplicationProvider from ui-kitten instead of ui-kitten/components