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

class issue while migrating #597

Closed
7 of 15 tasks
MicahDavid opened this issue Nov 11, 2022 · 1 comment
Closed
7 of 15 tasks

class issue while migrating #597

MicahDavid opened this issue Nov 11, 2022 · 1 comment
Labels
bug Crush'em all.

Comments

@MicahDavid
Copy link

MicahDavid commented Nov 11, 2022

Decision Table

  • My issue does not look like “The HTML attribute 'xxx' is ignored” (unless we claim support for it)
  • My issue does not look like “The HTML element <yyy> is not rendered”

Good Faith Declaration

Description

I was attempting to migrate from 5.x to 6.x, and encountered a problem with having classes in my HTML source. Strangely, when i downgraded back to 5.1.1, I'm still having the problem.

React Native Information

System:
    OS: macOS 12.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 121.46 MB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v14.18.1/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/micahsklut/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 29, 30
      Build Tools: 29.0.2, 30.0.2, 30.0.3
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8193401
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: ^0.70.4 => 0.70.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

RNRH Version

5.1.1 and 6.3.1

Tested Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Reproduction Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Minimal, Reproducible Example

<HTML
    source={{ html: `<div class="location-title">${item.locationName}</div>` }}
    classesStyles={{
        'location-title': {
            fontFamily: 'Roboto',
            fontWeight: '500',
            //color: 'black',
            color: globalStyles.colors.blue800,
            fontSize: RFValue(16),
            lineHeight: RFValue(19)
        }
    }}
/>

This gives me the following error:
undefined is not a function

If I change the source to:
<div class="location-title">${item.locationName}</div>

The error goes away, but obviously I don't get the intended style I desire.

Additional Notes

Pretty confusing, since I'm pretty sure I'm getting this back to the version where I was -> 5.1.1 The same error occurs on the latest 6.3.1

Thanks in advance for any suggestions.

@MicahDavid MicahDavid added the bug Crush'em all. label Nov 11, 2022
@MicahDavid
Copy link
Author

I removed node_modules directory and reinstalled packages, and everything works fine now. Somewhere in the process of upgrading things broke.

@jsamr jsamr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Crush'em all.
Projects
None yet
Development

No branches or pull requests

2 participants