-
Notifications
You must be signed in to change notification settings - Fork 24
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
Application requirements #3
Comments
Something we would love the Nuxt.js team's input on is the stack. I tend to use 'just' Nuxt or 'just' Vue directly when building out applications but I don't know how common it is to use, say Vuex for state management. If it's pretty common / recommended we could keep this in mind. |
@addyosmani I'd suggest using Vuex only if that suits the app needs (truly global, app-wide state). The Nuxt integration is pretty seamless, but I feel best practice is moving more to letting components manage their own state with swr/swrv-style data flow. |
Nuxt has a preset of integrations from vue ecosystem like Vuex integration for nuxt (docs) is optional and when a As @danielroe mentioned, global state management in vue applications can be much simpler and specially with vue@3 and CAPI, it doesn't makes sense in many cases to use. Also it has a 12.7kB/gz overhead! > See this refactor how we can make code easier and also smaller by dropping it. |
Thank you for your input. If we used Vuex, we would load not only the Vuex package JS bundle but also unnecessary store logic that is not to be used in some pages. For example, although we do not need the store logic and Vuex on the home page, we might end up loading it, which would impact the loading performance. Actually in the movies Next.js project, I checked that Redux package and its state management logic, which was loaded initially, impacted the loading performance. @addyosmani and I set it as an opportunity to improve the performance further. Besides that, personally, I don't think we should use Vuex for data management like data fetching, adding it to the store, and treating it as a cache as we can see in many apps. I think it might introduce a lot of issues like syncing state between frontend and backend. As @danielroe suggested, I think we can use swrv for caching as we do with React Query, SWR, or Apollo Client in React. FYI: From my experience with the movies Next.js project, the only global state we might need here as well is the authenticated state, which was handled by React context. |
[chore] add additions to .eslintignore
Sure! Just to check before I re-register for keys. We want this for http://nuxt-movies.zaps.vercel.app, right? |
After discussing it with Sebastien, we think that a Nuxt.js TMDB implementation would be complex enough to give us early signals into where some of the main gaps are hitting the Core Web Vitals when building with Vue and Nuxt.
Aspects that make this a good fit:
What am I hoping we will be able to get out of this exercise?
In terms of 'what' we are aiming to build here, here is a similar implementation Anton and I worked on using Next.js.
The text was updated successfully, but these errors were encountered: