cooperka / react-native-snackbar

:candy: Material Design "Snackbar" component for Android and iOS.
Other
815 stars 150 forks source link

Default export instance instead of interface #111

Closed tcodes0 closed 5 years ago

tcodes0 commented 5 years ago

Fixes ts errors

ghost commented 5 years ago

This should be merged asap

cooperka commented 5 years ago

There seems to be ongoing debate in https://github.com/cooperka/react-native-snackbar/pull/106 as to whether this is broken or not. I'm a bit baffled, because it seems there should be one clear "right way" to do it.

I'm going to assume, based on popular opinion, that this PR is the right one. Please weigh in if you have other feedback. Thanks for submitting @Thomazella.

slavikdenis commented 5 years ago

Still don't get it, why SnackBarOptions is not be exposed... (usage: https://github.com/cooperka/react-native-snackbar/pull/106#issuecomment-500327893)

cooperka commented 5 years ago

@slavikdenis if you need further changes please feel free to submit a PR. I'd also appreciate documentation explaining why certain changes were needed, if you do submit something.

TypeScript + React integration has always seemed a bit sketchy to me, and this is clearly no exception!

iRoachie commented 5 years ago

@slavikdenis Opened a PR to add in #116

slavikdenis commented 5 years ago

@iRoachie looks great to me :) https://github.com/iRoachie/react-native-snackbar/blob/fb8c6aac5697f6cd4c1e22d0dfdd261e9534beb2/src/index.d.ts#L25