Skip to content

Slide development with hot reload? #205

Description

@hermann-p

My first impression with WebSlides was - wow! This is super easy and I can preview my slides while I create them! Just hook it up to a library that hotloads DOM and I have instant feedback!

It turns out that WebSlides is not built with that in mind, but initialises the slides once on load. I created a workaround, calling essentially the tail of the constructor, that is on each hot reload, I'll do

ws.removeChildren_();
ws.grabSlides_();
ws.initSlides_();
ws.onInit_();

This will reload the slides with my changes. However, it will also clear the screen until I navigate once. I overcam that by also calling

history.go();

Now I have some working hot-reload, but it's super hacky and dependent on internals. Is there any way to do that better?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions