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
One of the part as a newbie to the framework that is totally confusing to me is the discussion about client vs server code. Like in a logging framework, trying to find one that can log statements and determine if they are server side and can be logged to a file. Discussions and docs say getStaticProps/getStaticPath only run during build time, but with fallback=true, it seems like they run server side when receiving a runtime dynamic route.
Is there a clean way to understand if the context of the function is server vs client? Are getStaticPaths/getStaticProps with fallback=true server side then and everything else in the component is client side?
And is there a logging framework that can determine that as well where it takes a single log statement and determines if it is client it goes to console otherwise it logs to file?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of the part as a newbie to the framework that is totally confusing to me is the discussion about client vs server code. Like in a logging framework, trying to find one that can log statements and determine if they are server side and can be logged to a file. Discussions and docs say getStaticProps/getStaticPath only run during build time, but with fallback=true, it seems like they run server side when receiving a runtime dynamic route.
Is there a clean way to understand if the context of the function is server vs client? Are getStaticPaths/getStaticProps with fallback=true server side then and everything else in the component is client side?
And is there a logging framework that can determine that as well where it takes a single log statement and determines if it is client it goes to console otherwise it logs to file?
Beta Was this translation helpful? Give feedback.
All reactions