Replies: 4 comments
-
|
And, of course hooks don't do anything dynamic in server-rendered code like this, but after solving this issue I can move on to adding the client JS in there for hydration. |
Beta Was this translation helpful? Give feedback.
-
|
This is a React SSR usage question and not a bug in Bun - converting to discussion |
Beta Was this translation helpful? Give feedback.
-
|
Hmm, still blocked on this. Definitely only one version of |
Beta Was this translation helpful? Give feedback.
-
|
Tried switching to preact just to see what happens and I get some error suggesting that duplicate copies of "preact" are in use. My only guess is that the Bun JSX loader for some reason uses a separate isolated copy of whatever's specified in "jsxImportSource". Definitely beyond my ability to debug. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Bun is running?
1.2.13+64ed68c9e
What platform is your computer?
Darwin 24.6.0 arm64 arm
What steps can reproduce the bug?
Use
Bun.serveto create a simple HTTP server. On one of the routes render a JSX file as the response. This works fine until you try using hooks. See minimal repro case in this repo:https://github.com/BurlyBurr/bunjsxinvalidhookrepro
What is the expected behavior?
Expected no error. Can't see how there would be any version mismatch between react and react-dom or anything.
What do you see instead?
No response
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions