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

Error cannot read property 'match' of undefined when using NeomorphFlex #66

Closed
yedi97 opened this issue Oct 12, 2023 · 1 comment
Closed

Comments

@yedi97
Copy link

yedi97 commented Oct 12, 2023

I receive an error when using NeomorphFlex as shown below:
IMG_2576
Below is my code:

import React from "react";
import { Dimensions, StyleSheet } from "react-native";
import { Neomorph, NeomorphFlex } from "react-native-neomorph-shadows";
import { normalize } from "../Style";
import { MARGIN_X_LARGE } from "../Style/constants";
const widthScreen =
  Dimensions.get("screen").width - normalize(MARGIN_X_LARGE * 3);
const BoxShadowComp = ({ children, style }) => {
  return (
    <NeomorphFlex
      inner
      style={[
        styles.neomorph8,
        {
          shadowOpacity: 0.1,
          shadowColor: "#EBEBEBE5",
        },
        style,
      ]}
    >
      {children}
    </NeomorphFlex>
  );
};
const styles = StyleSheet.create({
  neomorph8: {
    borderRadius: 12,
    shadowRadius: 5,
    backgroundColor: "#FFFFFF",
    // width: normalize(widthScreen),
    // height: normalize(100),
    justifyContent: "center",
    alignItems: "center",
  },
});

export const BoxShadow = React.memo(BoxShadowComp);

Work fine with Neomorph, please help me. Many thanks <3

@yedi97 yedi97 changed the title Error when using NeomorphFlex Error cannot read property 'match' of undefined when using NeomorphFlex Oct 12, 2023
@yedi97
Copy link
Author

yedi97 commented Oct 17, 2023

Fixed after remove [] in style, thank!

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

1 participant