-
-
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
Error with material-UI Alpha-v5 #295
Comments
Using the alpha v5 from material UI and react 16.13.1 |
Same here using alpha 6, saw it on Stack Overflow too |
In alpha 6, snackbars will actually never go close. |
Yeah, it's unusable on alpha.6 |
Yes in MUI alpha, these callbacks have been moved to - <Snackbar onExit={() => {}} />
+ <Snackbar TransitionProps={{ onExit: () => {} }} /> At this moment there are no plans for notistack to be compatible with alpha releases (but only stable releases) |
Could you just start on a next branch so we know where is this going? |
I just made a quick fix for Material-UI V5 alpha since @iamhosseindhv won't fix it right now, use it at your own risk.
|
I've been working on switching to |
@kikoanis Branch Removing MUI dependency has been the plan since very long time ago, requires lots of thoughts and patience, as well as back and forth emails with the MUI team. As the owner and maintainer of notistack, I'm responsible for making the transition as smooth as possible for everyone. I'm sure non of you want to spend 1h doing the migration. Looking at the changelog, you can see the trails of small, incremental progress. In the meantime, I'm committed to make sure notistack is production-ready, by being compatible with stable releases of MUI. |
@iamhosseindhv totally understandable. I really appreciate your hard work on the library. I am still keeping my old code just in case. It's been my number one for toasts for a long time. I am in for MUI 5 for a good reasons related to date pickers. |
I have just tried using the future branch, but looks like this issue is not fixed there yet. |
I think that the best way to avoid future occurrences of this problem in the alpha and beta lifespan of v5, is to include the features of notistack directly in Material-UI. From what I understand notistack brings 3 major features:
These features seem to be almost standard in the industry. They should likely come with Material-UI's Snackbar, as they do from many design systems:
If you look at their implementations, all* use a custom solution. It would make a lot of sense for Material-UI too as we are pushing in the unstyled direction for v5. @iamhosseindhv It would be awesome to consider bringing these features, I think that we can wait a bit for the migration to emotion and unstyled support to be more mature. We could also consider exposing hooks for it. |
So, how do we progress now with this? |
Options @mnemanja:
|
@mnemanja you could temporarily rely on |
Thanks @cansin. Just for reference, for people who wants to use your "next" package without breaking old code: npm install notistack@npm:notistack-next
yarn add notistack@npm:npm:notistack-next |
Same. Has this problem been resolved? |
@xiaoyu-tamu created "hot-fix". worked for me. note: it was a pet-project, but not real production app you can try it with: |
Please update to Let me know if the there're any issues. |
@iamhosseindhv still happening on |
Yup I mentioned that issue remains in the PR above. You can now use |
@iamhosseindhv Great! I think that we should look into updating the dependency for the demo in https://next.material-ui.com/components/snackbars/#notistack. We have recently completed the migration of the Slider to the unstyled approach. @mnajdova is working on a migration guide for the rest of the codebase, it would probably be good to experiment with the unstyled snackbar. |
Thanks @oliviertassinari. I think at this very moment we wouldn't achieve much by updating next.material-ui.com to use Although It certainly makes sense to do so when an unstyled version of snackbar/notistack is ready. |
This issue seems to still exist with |
@iamhosseindhv would you reopen, please? |
I'm getting the following error when the notification is shown:
Link: https://codesandbox.io/s/notistack-simple-example-forked-1b301
Using the alpha v5 from material UI and react 17
The text was updated successfully, but these errors were encountered: