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
Hey teams, I am confused where to make api calls in the universal.
Let's say I have to route A and route B
route A need data from C api and D api.
route B need data from C api and E api.
Now I use put C api call in middleware in action.
{path: 'subRoot',action(){// call C api// combine data from C api and child// return child},children: [{path: 'A',action(){// call D api// return }},{path: 'B',action(){// call D api// return }}
But I found that actually I do not need data from C api everytime route/url change. I only need it in server-side rendering and first time I switch to subRoot in client. Am I put these apis in the wrong places?
thanks
The text was updated successfully, but these errors were encountered:
Hey teams, I am confused where to make api calls in the universal.
Let's say I have to route A and route B
route A need data from C api and D api.
route B need data from C api and E api.
Now I use put C api call in middleware in action.
But I found that actually I do not need data from C api everytime route/url change. I only need it in server-side rendering and first time I switch to
subRoot
in client. Am I put these apis in the wrong places?thanks
The text was updated successfully, but these errors were encountered: