Loader without meteorhacks:inject-initial

Does someone know of an elegant/simple solution to display a loader on meteor startup without using meteorhacks:inject-initial? It does not work properly when using the static-html package, as this unfixed issue shows: https://github.com/meteorhacks/meteor-inject-initial/issues/22

@sacha did you find a workaround maybe?

1 Like

Bump! Pretty sure most people in the meteor community would be concerned by this.

Had to deal with this today. Found two approaches. In a Blaze app I used server-render to input the loading style and elements into the initial render. Had them as overlay and when the loading in my app reached the desired point I removed those elements, revealing the app.

In a React app I used static-html which allowed me to just put everything into main.html that was then rendered on initial load and when React got mounted I removed those elements.

Works pretty well in my case, though I think inject-initial used to get in there a bit faster.