Deprecated typography warning when using custom theme in Material-UI

倖福魔咒の 提交于 2019-12-06 05:06:11

The expanded error message links to https://material-ui.com/style/typography/#migration-to-typography-v2 which explains the message in more detail.

Above this you find the deprecated variants which include button. It's not actually deprecated but will be restyled which some consider a breaking change which is why we log this warning.

I agree that it's a bit overzealous to warn just by using createMuiTheme but I suspect that 95% of the use cases touch deprecated variants in some way.

I just add in my index.html:

<script>window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ = true</script>

For anyone here this has been addressed in release v3.6.1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!