You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very excellent demo project for the Nuxt community to learn it, especially like me who was first touch it.
I build projects from scratch and follow your code line by line. The backend references the project Conduit_NodeJS.
Conduit_NodeJS The project was written very simply and did the basics, but it had a lot of problems and didn't implement the API as it was supposed to, so I was mostly working on the original issues of the various projects. The Nuxt project taught me a lot about TypeScript and how to use Composition Api to encapsulate business logic.
In the current learning process, I also found some small problems, by the way, feedback:
An internal request is sent each time useProfileList() is called, which causes the list of articles to be repeatedly requested on the profile page.
The currently active tab does not display correctly based on the route change. If you are currently in the Favorited Posts tab, when you refresh the page, My Posts is selected, but the interface request is api/articles?favorited=xx&limit =20&offset=0. Also, if you click the user name on the profile page, the new profile page will not display correctly.
Normal logic if the user is logged in to see their favorite articles are highlighted. However, since it is rendered by the server, there is no authorization information at the request of the server, so the user cannot see it.
last, in file /pages/profile/_userName/index.vue and /pages/profile/_userName/favorites.vue, when call method useProfileList we pass parameter true.
The home page problems, I add some delay to wait till the auth token got, and the next request will take auth token in request headers so the server response the right payload.
Hi, guys
This is a very excellent demo project for the Nuxt community to learn it, especially like me who was first touch it.
I build projects from scratch and follow your code line by line. The backend references the project Conduit_NodeJS.
Conduit_NodeJS The project was written very simply and did the basics, but it had a lot of problems and didn't implement the API as it was supposed to, so I was mostly working on the original issues of the various projects. The Nuxt project taught me a lot about TypeScript and how to use Composition Api to encapsulate business logic.
In the current learning process, I also found some small problems, by the way, feedback:
useProfileList()
is called, which causes the list of articles to be repeatedly requested on the profile page.Favorited Posts
tab, when you refresh the page,My Posts
is selected, but the interface request isapi/articles?favorited=xx&limit =20&offset=0.
Also, if you click the user name on the profile page, the new profile page will not display correctly.Here are my solutions for your reference:
Profile page problems
path:
/compositions/useProfileList.ts
path:
/pages/profile/_userName.vue
add code:last, in file
/pages/profile/_userName/index.vue
and/pages/profile/_userName/favorites.vue
, when call methoduseProfileList
we pass parametertrue
.The home page problems, I add some delay to wait till the auth token got, and the next request will take auth token in request headers so the server response the right payload.
path:
/layout/default.vue
The text was updated successfully, but these errors were encountered: