Giter Club home page Giter Club logo

Comments (18)

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024 1

@kubalobo We used to pass variant=subtitle1 to bypass the warnings regarding internal use of a deprecated variant by material-ui SnackbarContent.

But this will be removed in the next release of notistack, since we can mute the warnings using useNextVariants in theme (see migration notes).

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024 1

Yes I did and it confirmed that notistack is the issue. Ok I will try to reproduce that and post it here.

from notistack.

pedro-dcc avatar pedro-dcc commented on May 18, 2024 1

Provide codesandbox @pedro-dcc

Sorry for coming back so late. I was wrong. I have faced this issue only because I had the snackbar provider outside MuiTheme. After put that inside the warning has gone. Thanks.

from notistack.

kubalobo avatar kubalobo commented on May 18, 2024

Propably something quite similar here:
image

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

@JakubPetriska notistack doesn't use any Typography component; however, material-ui SnackbarContent uses it internally.
Your issue should be fixed by migrating to Typography v2 api. Read the migration note here.

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024

@iamhosseindhv I actually am using the new Typography variants.

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

Have you tried isolating / commenting out notistack to make sure the warning is comming from notistack? @JakubPetriska

If you think it's a notistack issue, please reproduce the warning and provide a link to codesandbox.

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024

@iamhosseindhv The error can be seen in this codesandbox. It's the minimal notistack usage example from here but I updated the material-ui dependency to version 3.2.2. The same thing happens for material-ui 3.4.0.

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

@JakubPetriska Downloaded the sandbox and I don't get any warning.
Run npm ls @material-ui/core -g and check if you have the same version of material-ui installed. (note the -g flag)

I'll have an eye on this issue in case more people complained about it.

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024

The error happens in the sandbox. I didn't try to download it. Why is there a -g flag?

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

To compare material/notistack versions installed under /usr/local/lib and your working directory.

According to docs, "List packages in the global install prefix instead of in the current project." So I was wondering maybe you have different versions of material/notistack installed globally and your working directory.

What I just said might be irrelevant to the problem though.

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024

I don't have either installed globally, which the output of the command you sent confirmed.

from notistack.

pedro-dcc avatar pedro-dcc commented on May 18, 2024

This happens to me too and is notistack for sure... Any news on how to fix?
React 16.7.0-alpha.0
MUI 3.3.2
notistack 0.3.7

Since this will be fixed on 0.3.8 when this version will be published?

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

@pedro-dcc You should not get any warning regarding "Deprecated variants" using current version of notistack, if you have done material-ui migration instructions.

@JakubPetriska The reason minimal example gives us deprecation warnings is that we don't use theme in it. so we can't set Typography.useNextVariant to true. However, I've added the following loc to the minimal example to avoid getting those nasty warnings:

https://github.com/iamhosseindhv/notistack/blob/master/demo/MessageButtons.js#L47

// Avoid material-ui warnings. more info: https://material-ui.com/style/typography/#migration-to-typography-v2
window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ = true;

from notistack.

pedro-dcc avatar pedro-dcc commented on May 18, 2024

@iamhosseindhv you are wrong. I'm already setting "useNextVariants" to true and the warning still happened. And shows up when I show some notistack snackbar.
Also, with release from today i get another warning
screenshot 2018-11-19 at 22 20 24

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

Provide codesandbox @pedro-dcc

from notistack.

JakubPetriska avatar JakubPetriska commented on May 18, 2024

The warning being discussed here no longer appears. I upgraded dependencies in the codepen I provided, the changes can be seen here, and it no longer appears in there either. Unless somebody objects I guess we can close this @iamhosseindhv .

from notistack.

iamhosseindhv avatar iamhosseindhv commented on May 18, 2024

Thanks for the update @JakubPetriska

from notistack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.