calintamas / react-native-toast-message

Animated toast message component for React Native
MIT License
1.73k stars 265 forks source link

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

Closed dnlsilva closed 11 months ago

dnlsilva commented 1 year 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 11 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.