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.33k stars 954 forks source link

Select defaultAppearance is broken #611

Closed chandlervdw closed 5 years ago

chandlervdw commented 5 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior: On iOS, trying to use a Select results in an error that has to due with an unsupported style configuration. This is using a very vanilla implementation of Select but I am using hooks.

Expected behavior: Should render a Select properly.

Steps to reproduce: Add a Select to some component.

Related code:

              <Select
                  data={items}
                  selectedOption={selectedOrg}
                  onSelect={(selectedOption: SelectOption): void => {
                    setSelectedOrg(selectedOption);
                  }}
               />

Here's the error

console.error: "
Select: unsupported configuration.
Using UI Kitten components is only possible with configuring ApplicationProvider.
📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/guides/install-ui-kitten#configure-application-root

In case you have all in place, there might be an incorrect usage of a "styled" function.
📖 Documentation: https://akveo.github.io/react-native-ui-kitten/docs/design-system/custom-component-mapping"

Object.__expoConsoleLog
    RemoteConsole.js:80:31
Object.console.error
    YellowBox.js:59:8
Object.error
    muteWarnings.fx.js:26:18
new
    styleConsumer.service.js:23:20
Wrapper._this.onInit
    styleConsumer.component.js:126:31
Wrapper._this.renderWrappedElement
    styleConsumer.component.js:140:25
renderWithHooks
    ReactNativeRenderer-dev.js:9473:17
mountIndeterminateComponent
    ReactNativeRenderer-dev.js:11993:12
beginWork
    ReactNativeRenderer-dev.js:12835:13

Other information:

I have a hunch its from this commit: https://github.com/akveo/react-native-ui-kitten/commit/6eec5ca#commitcomment-35059486

OS, device, package version

iOS 12.4, iPhone Xs Max simulator, 34.0.0
32penkin commented 5 years ago

Hi @chandlervdw! Please try to upgrade react-native-ui-kitten to the last beta version. As well as eva packages.

aceluby commented 5 years ago

I'm seeing the same issue. Here are my dependencies:

"dependencies": {
    "@eva-design/eva": "^1.1.0-beta.1",
    "@expo/samples": "~3.0.3",
    "@expo/vector-icons": "^10.0.3",
    "@react-navigation/web": "^1.0.0-alpha.9",
    "expo": "^34.0.1",
    "expo-asset": "^6.0.0",
    "expo-constants": "6.0.0",
    "expo-font": "~6.0.0",
    "expo-web-browser": "6.0.0",
    "react": "16.8.3",
    "react-dom": "^16.8.6",
    "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
    "react-native-eva-icons": "^1.1.0",
    "react-native-gesture-handler": "~1.3.0",
    "react-native-svg": "^9.7.0",
    "react-native-ui-kitten": "^4.2.0-beta.2",
    "react-native-web": "^0.11.4",
    "react-navigation": "^3.11.0"
  },
chandlervdw commented 5 years ago

@32penkin package.json:

"react-native-ui-kitten": "^4.2.0-beta.1",
"@eva-design/eva": "^1.0.1"

That's what I was using when I posted this.

chandlervdw commented 5 years ago

I guess I need @eva-design/eva": "^1.1.0-beta.1"?

chandlervdw commented 5 years ago

yep, latest of both fixed it. Thanks @32penkin