Can't access getColors
Closed this issue · 1 comments
@osamaqarem When I use
import ImageColors from "react-native-image-colors";
I get error
TypeError: Cannot read property 'getColors' of undefined
When I use
import { getColors } from "react-native-image-colors";
I get error
TypeError: (0 , _reactNativeImageColors.getColors) is not a function
My code below:
import ImageColors from "react-native-image-colors";
class Expression extends Component {
async componentDidMount() {
const expressionBackground = await ImageColors.getColors(
this.props.data.expression.urls.max
);
console.log({ expressionBackground });
}
..... rest of code ....
I use Expo, could this be an issue?
I would really really like a solution to this.
This package is the most promising I've found to get image colors
Sorry, this library is using native code therefore it's not compatible with expo managed projects. You have to eject to install it.