sbalay / react-native-redux-toast

Simple to use, easy to customize Toast component for Android & iOS. Developed with love for redux apps
50 stars 21 forks source link

how can someone use your package along with the actions ? #4

Open PManager1 opened 7 years ago

PManager1 commented 7 years ago

the whole purpose of redux is that user can call on the views and change the state of the components from via the Actions.

I am not clear how I'd be able to do that with your package ?

sbalay commented 7 years ago

Hi @jpca999, could you take a look to the usage section of the readme? That's pretty much everything you need

PManager1 commented 7 years ago

I appreciate your reply...

1) I dont think youve provided anyway we can change the position of the toaster (customize )

usually it displays the toast at the bottom, how can i change it to display it on top ?

2) man your code works fine, its just when i try using it with my actions, i get the error message. Like its working fine but the moment i hoook more (my) actions it spits error messages,

const mapDispatchToProps = (dispatch) => { return { dispatch, prioritiesFetch: () => dispatch(prioritiesFetch()) } };

export default connect( null, mapDispatchToProps )(FollowupScreen);

sbalay commented 7 years ago

Let's discuss changing the position here #5.

About your error, what does the prioritiesFetch function do? Can you show me that code?

PManager1 commented 7 years ago

its not really about what the prioritiesFetch function do, but more about when i load the actions on my component it throws the eror. I dont think I know how to make the usual Actions play with Toaster's actions to dispatch properly.

hey @sbalay, most of my code is available on here, https://stackoverflow.com/questions/46493262/unable-to-call-actions-from-class-component-error-this-props-dispatch-is-not-a#46493262