Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createIsomorphicFn resolves to client implementation during SSR #3267

Closed
EskiMojo14 opened this issue Jan 28, 2025 · 0 comments · Fixed by #3268
Closed

createIsomorphicFn resolves to client implementation during SSR #3267

EskiMojo14 opened this issue Jan 28, 2025 · 0 comments · Fixed by #3268

Comments

@EskiMojo14
Copy link
Contributor

Which project does this relate to?

Start

Describe the bug

const resolvedEnv = opts.env === 'ssr' ? 'client' : opts.env

Isomorphic functions use client implementation during SSR, because the code says to.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-cnvd1vfk?file=app%2Froutes%2Findex.tsx,app%2Futils%2Fiso-fns.ts&preset=node

Steps to Reproduce the Bug or Issue

Create an isomorphic function, and log its result during SSR and CSR

Expected behavior

SSR should use the server implementation, because it's on the server.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: 132

Additional context

prompted from https://discord.com/channels/719702312431386674/1333870036431016047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant