-
Notifications
You must be signed in to change notification settings - Fork 947
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
Enabling static import into serverside code #3640
Comments
Our of curiosity, do you know what that would entail? I'm not sure of all SSR techniques, my guess is that using React, it's simply a different renderer right? But if we do DOM manipulation, that would be more challenging. |
@maartenbreddels yes, exactly. You're still rendering in React (or some framework) but are essentially rendering to a string. For react, I think it's basically the same renderer but only a single render pass occurs on the server (no side effects), then string is then sent to the client for "hydration" and smooth hydration is the trickier part. For ipywidgets, maybe the valuable case for SSR would be something akin to serialized widget state and how the HTMLManager allows this to be "hydrated" on a standalone page without a kernel? -- if he initial html can be generated without the DOM proper. |
Yes, thanks for confirming that. We are thinking about some form of SSR for https://github.com/widgetti/solara/ but we're not sure of the form yet. I was wondering if there may be SS dom implementations, but it seems most SSR methods avoid the DOM I guess. |
yes, the SSR i'm used to is about optimizing that initial page load and then deferring to post-hydration client side code to add interactivity. Perhaps there is a special case around ipywidgets though, where something like |
Problem
It is currently not possible to statically import
ipywidgets
into a platform likeremix.run
ornext.js
because of module side effects. The objective is not to enable SSR using jupyter widgets, but instead to reduce the friction of using them in frameworks that do SSR.This is related to open issues in JupyterLab and Lumino here:
Proposed Solution
Bring in the change suggested in this comment:
ipywidgets/packages/base/src/nativeview.ts
Line 38 in 2af0cc4
and work though any implications of that.
The text was updated successfully, but these errors were encountered: