calintamas / react-native-toast-message

Animated toast message component for React Native
MIT License
1.62k stars 255 forks source link

fix: props sent in show are not passed to the component correctly #487

Closed GleidsonDaniel closed 8 months ago

GleidsonDaniel commented 10 months ago

If you send any props through the show it is not passed to the component, since it only uses the deconstructed props, inside it does not make any spread.

toast.show({
  type: 'success',
  text1: 'Any text',
  props: { AnyProp: 123 }
});
calintamas commented 8 months ago

Hi @GleidsonDaniel, thanks for the PR, but the current implementation is the expected behavior. The idea is that it allows you to take any specific value needed (or none) from props and pass it forward to the component.