Skip to content
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

Why do we need @material/core ? #335

Closed
gothraven opened this issue Nov 30, 2020 · 6 comments
Closed

Why do we need @material/core ? #335

gothraven opened this issue Nov 30, 2020 · 6 comments

Comments

@gothraven
Copy link

I just installed notistack in a CRA and when i did yarn start I have got this error

Failed to compile.

./node_modules/notistack/dist/notistack.esm.js
Module not found: Can't resolve '@material-ui/core/ClickAwayListener' in '/--path--/node_modules/notistack/dist'

And I started asking myself why do I need @material-ui ? I don't want to use it! and why the docs doesn't even mention this ?!

Expected Behavior

I expect this to work without me needing to install @material-ui

Your Environment

Tech Version
Notistack v1.0.2
React v17.0.1
Browser chrome
@iamhosseindhv
Copy link
Owner

I get your point.
There is a work in progress to remove MUI dependency: #184

Until a new version of notistack is released which is independent of MUI, you'll have to have it installed. This won't impact your bundle size significantly if you've enabled tree shaking.

@iamhosseindhv
Copy link
Owner

Although I'm interested to know how (if at all) you're customising styling of the snackbars @gothraven

@gothraven
Copy link
Author

@iamhosseindhv I'm actually using the provider content prop to inject my own snack-bar component and I use the message param to to send whatever I want, I use nothing but the logic of showing and dismissing snack-bars

@oncet
Copy link

oncet commented Feb 6, 2021

Such a boomer. Was really excited for trying Notistack until I got this error. I guess I'll stick to react-toastify for now.

@Yard-Daniel
Copy link

Yard-Daniel commented Jan 17, 2023

Just checked the logs and this is still a problem after 2 years and mentioned a couple of times of the past few years 😄

yarn add notistack@alpha works, but isn't documented correctly.

@iamhosseindhv
Copy link
Owner

Hey @Yard-Daniel . The alpha version is a WIP which doesn't have dependency on MUI and will be published as the stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants