ScalablyTyped / SlinkyDemos

MIT License
29 stars 8 forks source link

Try to get hot-reload working on the material-ui demo #33

Closed AlexITC closed 3 years ago

AlexITC commented 4 years ago

This is just a try as I'm not able to get the hot-reload working properly, I have grabbed the code from the default slinky template but for some reason, I get a blank page.

To be honest, I'm not that familiar with scalajs to understand what I'm missing, hopefully someone around is.

Thanks.

oyvindberg commented 4 years ago

So yeah, I've never really bothered with hot reloading myself. I saw you saw https://gitter.im/shadaj/slinky?at=5f78d04e65cb03206069c032 , so I guess it's possible to try to rewrite functional components into class components - I think it's a pretty easy refactoring

AlexITC commented 4 years ago

I did, the problem seems to be related to the webpack config, hot-reloading even with functional components should work better that restarting the whole app, I'll give another try soon.

AlexITC commented 4 years ago

FYI: I got this working on a private project, I'll try to port it to the examples soon.

oyvindberg commented 3 years ago

any luck here @AlexITC ?

AlexITC commented 3 years ago

@oyvindberg I forget to upload the changes, here they are, running sbt dev gets such hot-reloading effect, which is not the same as how it is when using the non-functional components, but, to me, is far better that manual restart.

AlexITC commented 3 years ago

At the end, this took me too long, I fixed the minor details and merged (887b81690693e35189ab199578d6ffe88b863ae6), it would be nice to include hot-reloading on the remaining projects.