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

Library not working with RN 0.73.9 / Android API 34. Suggest alternate library similar to this. #182

Open
ManjinderRayatTelus opened this issue Aug 7, 2024 · 2 comments

Comments

@ManjinderRayatTelus
Copy link

ManjinderRayatTelus commented Aug 7, 2024

If this is an issue with the library and it is not maintained, can somebody suggest an alternative library that can be used with minimum code changes.

Steps to Reproduce

  1. Update app to use RN V 0.73.9
  2. Create an android build to target API level 34
  3. Run the app and you get below error
    Error: TypeError: Cannot read property 'backgroundColor' of undefined

Try in Expo

Expected Behavior

App component is able to access styles objects defined in the styles file. styles object returned by EStyleSheet is emptt json object. This was working on RN 0.71 for Android 33.

Actual Behavior

App components are not able to access objects defined in the styles file.

Show the code

Below styles
import { Platform } from "react-native";
import EStyleSheet from "react-native-extended-stylesheet";
import { theme, gutter } from "../../Utils/Helpers/theme";

export const styles = EStyleSheet.create({
header: {
backgroundColor: theme.colors.mainPurple,
display: "flex",
flexDirection: "row",
borderBottomWidth: 0,
alignItems: "center",
width: "100%",
...Platform.select({
android: {
paddingTop: 0,
height: gutter(14)
}
})
},
statusBarContainer: {
backgroundColor: theme.colors.mainPurple,
width: "100%"
},
leftContainerStyle: {
justifyContent: "flex-start"
},
centerContainerStyle: {
justifyContent: "center"
},
rightContainerStyle: {
justifyContent: "flex-end"
}
});

Environment

@guzeradimaz
Copy link

@guzeradimaz
Copy link

On version 76 the same problem, no styles

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

No branches or pull requests

2 participants