osamaqarem/react-native-image-colors

Can not find native module ImageColors in react native cli

Closed this issue · 2 comments

In my react native projects, It's thrwoing the error can not find native module ImageColors.
`import {useEffect, useState} from 'react';
import {colors} from '../constants/tokens';
import {getColors} from 'react-native-image-colors';

export const usePlayerBackground = imageUrl => {
const [imageColors, setImageColors] = useState(null);
console.log('imageColors: ', imageColors);

useEffect(() => {
getColors(imageUrl, {
fallback: colors.background,
cache: true,
key: imageUrl,
}).then(colors => setImageColors(colors));
}, [imageUrl]);

return {imageColors};
};
`

and? any fix

@mdalishanali How did you fixed this bro?