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

Use experimental Miso components support #1324

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

georgefst
Copy link
Contributor

See dmjio/miso#766.

This works, until the last commit, where we try to actually add a component, which causes the app to crash with TypeError: obj.mount is not a function. The Miso components branch does not yet support Wasm (or jsaddle-warp) due to a need for synchronous callbacks, but this is being worked on at this very moment.

If upstream support does appear in the next week or so, then I propose that we use this as the basis for the next stage of frontend development, i.e. we rebase my WIP actions and eval work on top of this. Both the actions and eval panels would benefit from being components since they have a natural notion of internal state. I would otherwise have considered fake components as outlined here, but I'd say we're better off embracing the future. The success of the frontend rewrite so far has been built on using bleeding edge features and working closely with upstream maintainers. I see no reason to stop now!

@georgefst georgefst force-pushed the georgefst/miso-components branch from 42ec653 to de4d88e Compare February 24, 2025 23:25
@dhess
Copy link
Member

dhess commented Feb 25, 2025

We're in no hurry, so we might as well wait a bit for the components Wasm support.

This is generally a good idea for performance reasons, since it means that `JSString` is used when compiling for JS or Wasm. And Miso's upcoming components support is stricter about requiring it.

Signed-off-by: George Thomas <[email protected]>
This does not, or at least should not, yet cause any changes in functionality.

Signed-off-by: George Thomas <[email protected]>
@georgefst georgefst force-pushed the georgefst/miso-components branch from de4d88e to 5424a8e Compare February 25, 2025 13:14
@georgefst
Copy link
Contributor Author

Well, we didn't have to wait very long! Miso's components now work with jsaddle-warp and jsaddle-wasm. Both use async callbacks for mounting which is unsafe in theory. In the Wasm case, sync callbacks are coming soon but I think there's some work needed in jsaddle and miso for it to filter through.

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

Successfully merging this pull request may close these issues.

2 participants