Changing HTML pages isn't smooth


#1

Hello,

I’m currently making my first electron app that has different HTML pages all navigated by a sidebar. This uses a simple <nav> tag with <a> links. However when I change the page by clicking on one of the links; it has a blank section in-between each page:

Is there any way I can fix this or has anyone got any other suggestions. Thanks!


#2

You should use a SPA framework or something, fresh page loads will always give you those white flashes.

I use AngularJS, but I know a lot of people use React. Either way, there’s a bunch here: http://todomvc.com/ (You could always try choo and report back, looks pretty easy and lightweight, but I don’t think it’s super performant right now, but should do the job)

Either way, ideally, you just want to swap out that middle pane, as opposed to loading a page from scratch.