Using Hype with Meteor.js


(Jason) #1

Hi,

Has anyone here been able to use Hype with Meteor.js? I keep getting a null reference error when I add the javascript to the client/lib file.

Thanks,

Jason


Using Hype to create front-end UI for MeteorJS web app
(Jason) #2

For now, I’ve encapsulated it in an iframe, but am still curious if anyone has got any further with this.


(Sean) #3

Hi,

I’m interested in using Hype to create the UI for my MeteorJS web app, where the idea is to generate the layout in MeteorJS and then manually edit in Sublime Text to add the template code to the document. It’s not working out the way I thought, however, as I can’t get the Hype page to load in my MeteorJS project.

Has anyone else attempted to use Hype and MeteorJS? I can find only one other post mentioning MeteorJS, and it’s unanswered. Any help is appreciated!

-Sean


(Mark Hunte) #4

It looks like not many have gone down this route.

But if you post a project someone may be curious to look at it…


#5

In general Hype has a garbage collection problem. This must be kept in mind when developing with reactive (shadow DOM) approaches and embedding Hype. Hype is currently not built for multiple reloads/rebuilds on a page without a hard refresh.

I did a garbage collection test here

The result is that the browser accumulates memory, listeners etc. and dynamic style sheets in the header.

When I was coding HypeTwineStage

I wrote at least a brute force routine to remove the duplicated stylesheets (jQuery version) attached:

    /* remove div's (css) from head */
    $("head").find("div").each(function() {
        $(this).remove();
    });
    /* "forget" Hype-documents */
    if (window.hasOwnProperty('HYPE')) {
        for (var n in window.HYPE.documents) delete window.HYPE.documents[n];
    }

But this is only a temporary measure and works for limited amount of reloads relying on the browsers garbage collection. For Hype to work in dynamic views one would need a “real” native unload function to truly support reactive JS.

I am not seeing this appear soon but I am hoping on it for version 4.5 or 5.