Refresh dependencies project-wide
Opened this issue · 5 comments
There are some updates which can be taken with this repo such as the update to React 17 (which only requires a codemod to complete) and replacement of @apollo/react-components
(now part of @apollo/client
following a yarn add @apollo/client@3
. Could be a good first issue for anyone and with things like the codemod good to get in front of so downstream users don't need to immediately fork storefront to take on these updates.
Also, its possible to upgrade Next to version 10. Probably a good idea to stay on top of that. There's a related open issue for a 9.5 upgrade but that's already stale.
Using Next 10 would help reduce quite some boilerplate related to i18n. We wouldn’t need the toplevel dynamic path segment anymore, also Links don’t need to specify as and href each time as Nextjs would resolve them automatically. Browser Header locale detection is now built in aswell.
Another item for the Next 10 part of the upgrade is to move the viewport
meta into _app
from _document
as there's an issue in Next deduplicating at least that one meta tag (and later Next versions will WARN about it). See here for more info: vercel/next.js#13230
Another easy win is to upgrade react-helmet to 6.x to clean up some particularly noisy Next compiler warnings.
@balibebas In other projects I removed react-helmet
altogether in the meantime as next/head
provides the same functionality that was used from helmet. Especially since the head and managing the order in there etc. seems to be an ongoing thing where issues seem to pop up here and there and further recent changes where made in nextjs, I'd be in favor of keeping this simple.
Also going to suggest a bump to MUI v5 beta as, according to maintainers, V4 has been out of active development for a year.