lucasferreira / react-native-flash-message

React Native flashbar and top notification alert utility
MIT License
1.42k stars 154 forks source link

Invalid prop `icon` supplied to `FlashMessage`, expected one of type [string, object]. #236

Closed ObjectJosh closed 1 year ago

ObjectJosh commented 1 year ago
Screen Shot 2023-01-10 at 11 56 48 AM

Error with the type of the icon prop for FlashMessage. Comes up every time the app is loaded. Is my usage incorrect, or should it not be raising an error?

Usage in code:

Screen Shot 2023-01-10 at 11 57 44 AM
lucasferreira commented 1 year ago

Hi @ObjectJosh

Your usage is wrong, icon are passed in showMessage function call, like shown in README:

https://github.com/lucasferreira/react-native-flash-message#message-with-custom-icon

And in this examples:

https://github.com/lucasferreira/react-native-flash-message/blob/master/examples/FlashMessagePlayground/screens/MainScreen.js#L30