What is the recommended way to write isomorphic code (code for both client/server, SSR-only, etc) for loaders? i.e. if I want to read the users cookies in the loader function, or headers used for a SSR request etc?
For cookies right now I'm doing the following - would like to know how code like this is intended to be done .