Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Themed component documentation problem #871

Closed
iimog opened this issue Feb 9, 2020 · 2 comments · Fixed by #872
Closed

Themed component documentation problem #871

iimog opened this issue Feb 9, 2020 · 2 comments · Fixed by #872

Comments

@iimog
Copy link
Contributor

iimog commented Feb 9, 2020

🐛 Bug Report

The documentation for using themed components does not work as is.
One problem has already been reported: #464 but the docu is not yet updated. There is an additional problem causing the error:

TypeError: undefined is not an object (evaluating '_this$props.themedStyle')

This is caused by accessing this.props in AwesomeView even though it is a function component and not a class.

To Reproduce

Use the example code as given in docs/src/articles/design-system/use-theme-variables.md

Expected behavior

The code should work without error message and applying the passed styles.

Link to runnable example or repository (highly encouraged)

https://github.com/akveo/react-native-ui-kitten/blob/master/docs/src/articles/design-system/use-theme-variables.md

UI Kitten and Eva version

Package Version
@eva-design/eva 1.3.1
@ui-kitten/components 4.3.2

Environment information

  System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
  Binaries:
    Node: 13.6.0 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: ~16.9.0 => 16.9.0 
    react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 
@iimog iimog changed the title Themed component documentaton Themed component documentation problem Feb 9, 2020
iimog added a commit to iimog/react-native-ui-kitten that referenced this issue Feb 9, 2020
@artyorsh
Copy link
Collaborator

artyorsh commented Feb 9, 2020

@iimog documentation is actual for 4.4.0-beta.3, which is mentioned on the website. Can you confirm you have this problem? Live examples use same code

@artyorsh
Copy link
Collaborator

artyorsh commented Feb 9, 2020

Ah, you're about this keyword in functional components. Then yes, thanks for reporting 😄

iimog added a commit to iimog/react-native-ui-kitten that referenced this issue Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants