-
-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to compose on functional components (without export default) #29
Comments
I'm not sure if I followed @TITAN9389, but if you don't have access to I'm sure I can help more if you provide a codesandbox example. |
its a little bit complicated to make a sample on sandbox ,i got your point about returning promise i'll try and see if i'll need further help will tell, thanks. |
I'm closing this but let me know if there was a problem. login = () => (
new Promise((resolve) => {
const firebase = getFirebase();
try {
await firebase.auth().signInWithEmailAndPassword(creds.email, creds.password);
resolve()
}
catch (error) {
console.log(error);
}
});
); // in your component
login().then(() => this.props.enqueueSnackbar(...)) |
I have components which exports multi functions , i tried many ways to compose this on them but non worked , if anyone can help will appreciate that.
here is sample of my code (there are x3 like this one)
how can make enqueueSnackbar works here ?
The text was updated successfully, but these errors were encountered: