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
Because we are doing useEffect in the api.ts, we have to use client to ensure all code runs on the client-side. There are functions that could (should?) run on the server side.
Describe the solution you'd like
Split the api file into api_client/api_server, and use the server functions where appropriate
Describe alternatives you've considered
I might be using it wrong.
The text was updated successfully, but these errors were encountered:
This would require a rewrite of almost all of the api's that you want to be used in the server side. As almost all of them implement functionality that requires rendering on the client side (useSWR, useEffect, useRouter). I think that it would be most helpful to identify the api's that "need" to be rendered in the client side because we need to do more than just split the file.
Because we are doing
useEffect
in the api.ts, we have touse client
to ensure all code runs on the client-side. There are functions that could (should?) run on the server side.Describe the solution you'd like
Split the api file into api_client/api_server, and use the server functions where appropriate
Describe alternatives you've considered
I might be using it wrong.
The text was updated successfully, but these errors were encountered: