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

Replace Snabbdom #21

Closed
davesmith00000 opened this issue Jan 16, 2022 · 2 comments
Closed

Replace Snabbdom #21

davesmith00000 opened this issue Jan 16, 2022 · 2 comments

Comments

@davesmith00000
Copy link
Member

Snabbdom is the JS Virtual DOM implementation that powers Tyrian's rendering at the moment.

I'd like to investigate replacing it with a pure Scala.js Incremental DOM (or something).

The point of this is to make the SPA and SSR rendering happen via the same process.

Step one is to do the naive thing and just re-render on-change, and replace the innerHtml of the top level element completely. That will work (probably), but will be slow (probably, but is cheap memory-wise), everything after that is an optimisation.

  • We'll need a way to run tests in the browser so we can talk to a real DOM - there is a Scala.js selenium thing for that.
  • We could also do with figuring out a way to benchmark this compared a) to Snabbdom and b) to other solutions, like Elm and React. Don't need to be the fastest on the market but can't be appallingly slow either.
@davesmith00000
Copy link
Member Author

Will be in the next release when this PR is merged:
#99

@davesmith00000
Copy link
Member Author

Done! Went out with 0.5.0.

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

No branches or pull requests

1 participant