-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
update antd-mobile to v2 #5419
update antd-mobile to v2 #5419
Conversation
Enalmada
commented
Oct 9, 2018
- dependencies updated to latest versions
- koubei icon gone, replaced with up
- viewport method changed from hd to meta per migration guide
- url changed to router withRouter() per next migration docs
- this.state -> setState per console deprecation notice
- Icon -> CustomIcon per antd-mobile 2x migration docs
- tiny bit of formatting intelij must have done (hope that is ok)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there is a client/server mismatch. See console:
Warning: Prop `aria-labelledby` did not match. Server: "m-tabs-3-0" Client: "m-tabs-0-0"
@HaNdTriX Thanks for taking a look! I noticed that client/server mismatch console error but sadly have no idea how to fix. (Closest hint I could find was this post). Since this example didn't run at all when I tried it, I didn't confirm if that is an existing issue in example code or due to antd version upgrade I did. I am hoping my changes to get this thing runnable on latest next will at least avoid complete new user frustration until someone more experienced than I can push a fix for that console error. |
} | ||
`, | ||
}}/> | ||
|
||
<link rel='stylesheet' type='text/css' href='//unpkg.com/antd-mobile/dist/antd-mobile.min.css' /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets also use the version from the package antd-mobile
for that.
See https://github.com/zeit/next-plugins/tree/master/packages/next-css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately when I try to load in css from antd-mobile I get this error:
It looks like there has been some bug in Next in the past about this?
Any ideas why just importing css causes that error?
@Enalmada by the way! Thanks for this great job! 🙏 |
@HaNdTriX Could you try importing the css next.config.js
I seem to be hitting this: #1352 but I am unsure if this is a bug in Next.js or if users are required to put something in next.config.js to handle normalize.css? |
@Enalmada I tried it but it worked with my const withCss = require('@zeit/next-css')
module.exports = withCss() What next.js version are you using? Currently I also don't have an idea whats causing the client/server mismatch. Maybe it`s an antd-mobile issue? |
@HaNdTriX I am using next 7.0.2. Looks like your example just got merged...thank you for your help getting antd-mobile example working on latest next! |