Skip to content

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.

@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.

Miso currently uses `type MisoString = Text` when targeting Wasm, but will soon change to `JSString` for better performance, as is already the case when targeting JavaScript. So this is future-proofing.

Signed-off-by: George Thomas <[email protected]>
Other unreleased changes include better Wasm support.

This does not, or at least should not, yet cause any changes in functionality.

Signed-off-by: George Thomas <[email protected]>
Signed-off-by: George Thomas <[email protected]>
@georgefst georgefst force-pushed the georgefst/miso-components branch from 5424a8e to 15d8767 Compare March 10, 2025 14:50
@georgefst
Copy link
Contributor Author

I decided against this for now due to the rate of churn on Miso HEAD recently.

The MisoString commit has been repurposed as part of #1347.

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